From 71f29c3467fe5f2deab577ffaa56ccfa88ff45c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Thu, 4 Dec 2025 17:45:45 +0100 Subject: [PATCH] Refine Docker metadata extraction and build conditions for master branch --- .github/workflows/docker-publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d26f68d..b44903f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -40,16 +40,16 @@ jobs: # Extract metadata (tags, labels) from Git reference and GitHub events for Docker - id: meta uses: docker/metadata-action@v5 - if: github.event_name != 'pull_request' + if: github.ref == 'refs/heads/master' with: images: ghcr.io/thelovinator1/anewdawn - tags: type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} + tags: type=raw,value=latest # Build and push the Docker image - uses: docker/build-push-action@v6 - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master' with: context: . - push: ${{ github.event_name != 'pull_request' }} + push: true labels: ${{ steps.meta.outputs.labels }} tags: ${{ steps.meta.outputs.tags }}