Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Update docker to use buildx multiplatform
Browse files Browse the repository at this point in the history
  • Loading branch information
myoung34 committed Jan 7, 2020
1 parent db35b2c commit 55094af
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 34 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,20 @@ jobs:
run: echo "::set-env name=PYTHONPATH::$(pwd)"
- name: pytest
run: py.test --cov-config .coveragerc --cov tilty --cov-report term-missing --cov-report xml --junitxml junit.xml tests
latest_deploy_x86:
latest_deploy:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Build
run: docker build -t myoung34/tilty:latest .
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Push to hub registry
run: docker push myoung34/tilty:latest
latest_deploy_arm:
runs-on: self-hosted
needs: [test]
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: Build
run: docker build -t myoung34/tilty:latest-arm .
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Push to hub registry
run: docker push myoung34/tilty:latest-arm
run: docker buildx build -t myoung34/tilty:latest --output "type=image,push=true" --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 .
27 changes: 9 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,22 @@ jobs:
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD : ${{ secrets.TWINE_PASSWORD }}
ubuntu_tag_deploy_x86:
ubuntu_tag_deploy:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: get version
run: echo "::set-env name=TAG::$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g")"
- name: Build
run: docker build -t myoung34/tilty:${TAG} .
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Push to hub registry
run: docker push myoung34/tilty:${TAG}
ubuntu_tag_deploy_arm:
runs-on: self-hosted
needs: [test]
steps:
- name: Copy Repo Files
uses: actions/checkout@master
- name: get version
run: echo "::set-env name=TAG::$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g")"
- name: Build
run: docker build -t myoung34/tilty:${TAG}-arm .
- name: Login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_TOKEN }}
- name: Push to hub registry
run: docker push myoung34/tilty:${TAG}-arm
run: docker buildx build -t myoung34/tilty:${TAG} --output "type=image,push=true" --platform linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 .

0 comments on commit 55094af

Please sign in to comment.