From 1c918a50bcf9799a40d8d00663eeb506ed2c2718 Mon Sep 17 00:00:00 2001 From: Benjamin Cane Date: Sat, 10 Feb 2024 07:13:54 -0700 Subject: [PATCH 1/2] adding arm platform to docker build --- .github/workflows/docker.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ed94a7b..d85cb8b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,6 +3,8 @@ on: push: branches: - main + tags: + - v* jobs: build-latest: runs-on: ubuntu-latest @@ -16,9 +18,19 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push + - name: Build and push (main) id: docker_build + if: github.ref == 'refs/heads/main' uses: docker/build-push-action@v2 with: + platforms: linux/amd64,linux/arm64 push: true tags: madflojo/tarmac:unstable + - name: Build and push (tag) + id: docker_build_tag + if: startsWith(github.ref, 'refs/tags/v') + uses: docker/build-push-action@v2 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: madflojo/tarmac:latest From 55a2dcebe17a867f563384bae65d98f0b0dfe5d1 Mon Sep 17 00:00:00 2001 From: Benjamin Cane Date: Sat, 10 Feb 2024 07:18:39 -0700 Subject: [PATCH 2/2] updating tag to use tag name for version --- .github/workflows/docker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d85cb8b..408775e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -33,4 +33,5 @@ jobs: with: platforms: linux/amd64,linux/arm64 push: true - tags: madflojo/tarmac:latest + # tag with the git tag v* + tags: madflojo/tarmac:${{ github.ref_name }}