Skip to content

Commit

Permalink
Update ci with buildx. Add arm64 platorm.
Browse files Browse the repository at this point in the history
  • Loading branch information
adobromilskiy committed Oct 17, 2022
1 parent 682770b commit f2d844a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ jobs:
with:
path-to-profile: cover.out

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64

- name: build and push branched image
if: github.event_name == 'push'
run: |
Expand All @@ -42,16 +50,12 @@ jobs:
- name: build and push latest image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
docker build -t adobromilskiy/quake3-logcatcher:latest .
docker login --username ${{ secrets.DOCKERHUB_USER }} --password ${{ secrets.DOCKERHUB_PASSWD }}
docker push adobromilskiy/quake3-logcatcher:latest
docker buildx build --push -t adobromilskiy/quake3-logcatcher:latest .
- name: build and push tagged image
if: github.event_name == 'push' && github.event.ref_type == 'tag'
run: |
GIT_TAG="${GITHUB_REF#refs/tags/}"
docker build -t adobromilskiy/quake3-logcatcher:${GIT_TAG} .
docker login --username ${{ secrets.DOCKERHUB_USER }} --password ${{ secrets.DOCKERHUB_PASSWD }}
docker push adobromilskiy/quake3-logcatcher:${GIT_TAG}
docker tag adobromilskiy/quake3-logcatcher:${GIT_TAG} adobromilskiy/quake3-logcatcher:latest
docker push adobromilskiy/quake3-logcatcher:latest
docker buildx build --push -t adobromilskiy/quake3-logcatcher:${GIT_TAG} .

0 comments on commit f2d844a

Please sign in to comment.