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.
This commit is contained in:
Sebastian Di Luzio 2025-04-24 11:58:33 +02:00 committed by GitHub
parent b02aa2c9c4
commit 7cc8b3ef09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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