From c681e21363f7730e0f8babcc17d1b3d760c6d1ba Mon Sep 17 00:00:00 2001 From: Andrew Kostka Date: Wed, 29 Jan 2025 12:22:08 +0000 Subject: [PATCH] Use commit hash to tag container images --- .github/workflows/docker.build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.build.yml b/.github/workflows/docker.build.yml index 4c86f03..95f7d25 100644 --- a/.github/workflows/docker.build.yml +++ b/.github/workflows/docker.build.yml @@ -4,8 +4,6 @@ on: push: branches: - 'main' - tags: - - '*' pull_request: jobs: @@ -21,6 +19,8 @@ jobs: uses: crazy-max/ghaction-docker-meta@v4.3.0 with: images: ghcr.io/${{ github.repository }} + tags: | + type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v2.1.0 @@ -38,7 +38,6 @@ jobs: - name: Login to GitHub Container Registry uses: docker/login-action@v2.1.0 - if: github.event_name != 'pull_request' with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -52,6 +51,6 @@ jobs: platforms: linux/amd64 cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,mode=max,dest=/tmp/.buildx-cache - push: ${{ github.event_name != 'pull_request' }} + push: true tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} \ No newline at end of file