From a08f9e1c91faaceb592f1fba50afc3f439e6cf6d Mon Sep 17 00:00:00 2001 From: Morten Olsen Date: Mon, 15 Jan 2024 13:50:06 +0100 Subject: [PATCH] chore: docker multi arch (#35) --- .github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 476523a..99dd529 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,12 +71,24 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 + - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Retrieve version + run: | + echo "TAG_NAME=$(git describe --tag --abbrev=0) >> $GITHUB_OUTPUT + id: version + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 @@ -84,11 +96,16 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | latest + ${{ steps.version.outputs.TAG_NAME }} + - name: Build and push Docker image uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: context: . file: ./docker/Dockerfile + platforms: linux/amd64,linux/arm64 + cache-from: type=gha + cache-to: type=gha,mode=max push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}