CI: Fix imprecise 'onMaster' checks

This commit is contained in:
Geza Lore
2026-09-20 20:40:22 +01:00
parent 77e9938188
commit bef6c8afa0
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -36,7 +36,8 @@ jobs:
- name: Set up Python venv
uses: ./repo/.github/actions/setup-venv
with:
save: ${{ github.ref == 'refs/heads/master' }}
# Check the event too: 'github.ref' is the base branch on a closed pull request
save: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
- name: Lint
run: |-
+3 -2
View File
@@ -92,7 +92,8 @@ jobs:
- name: Set up Python venv
uses: ./repo/.github/actions/setup-venv
with:
save: ${{ github.ref == 'refs/heads/master' }}
# Check the event too: 'github.ref' is the base branch on a closed pull request
save: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' }}
- name: Test
id: run-test
@@ -125,7 +126,7 @@ jobs:
path: ${{ env.CCACHE_DIR }}
key: ${{ steps.ccache.outputs.key }}
# Keep master's cache around longer; PR/branch caches churn faster
retention-days: ${{ github.ref == 'refs/heads/master' && 7 || 3 }}
retention-days: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' && 7 || 3 }}
- name: Fail job if a test failed
if: ${{ steps.run-test.outcome == 'failure' && !cancelled() }}