From 7cc8b3ef09f878b82f23f2a3442f9f430a2bca6a Mon Sep 17 00:00:00 2001 From: Sebastian Di Luzio Date: Thu, 24 Apr 2025 11:58:33 +0200 Subject: [PATCH] ci: run pipeline on main this will ensure the container can always build and keep caches ready for release. push should only happen on tag triggers It also removes some files from the PR trigger that should never break the build, and would just invalidate cache. --- .github/workflows/docker-release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 9fd48c586..22de4fb15 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -4,14 +4,14 @@ on: push: tags: - '*Release*' + branches: + - master pull_request: branches: - master paths: - '.github/workflows/docker-release.yml' - 'CMakeLists.txt' - - 'LICENSE' - - 'README.md' - 'Dockerfile' - 'servatrice/**' - 'common/**' @@ -52,7 +52,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry - if: github.event_name != 'pull_request' + if: github.ref_type == 'tag' uses: docker/login-action@v3 with: registry: ghcr.io @@ -64,7 +64,7 @@ jobs: with: context: . platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.ref_type == 'tag' }} tags: ${{ steps.metadata.outputs.tags }} labels: ${{ steps.metadata.outputs.labels }} cache-from: type=gha