From d3edc9839e4f485f7a89aec6c50bff648204d618 Mon Sep 17 00:00:00 2001 From: Paul Voss Date: Sun, 12 Feb 2023 11:08:10 +0100 Subject: [PATCH] Add buildx pipeline for tag 'latest' --- .github/workflows/image-latest.yml | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/image-latest.yml diff --git a/.github/workflows/image-latest.yml b/.github/workflows/image-latest.yml new file mode 100644 index 0000000..05fbd28 --- /dev/null +++ b/.github/workflows/image-latest.yml @@ -0,0 +1,46 @@ +name: Build latest image + +on: + # Runs on pushes targeting the default branch + push: + branches: ["buildx"] # replace with main + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Container Registry +permissions: + contents: read + packages: write + +# Allow one concurrent deployment +concurrency: + group: "image-latest" + cancel-in-progress: true + +env: + DEPLOY_TAG: latest + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ghcr.io/${{ github.repository }}:${{ env.DEPLOY_TAG }}