CI: fix ccache-setup load failure (github context in composite if:)

The scheduled-reseed step gated CCACHE_RECACHE with
`if: github.event_name == 'schedule'`, but the github context is not
available in a composite action's step-level if:. The action manifest
therefore failed to load ("Unrecognized named-value: 'github'"), and
every workflow using ccache-setup broke at the "Set up ccache" step
(build library, make check, Compiler test, Multi-arch test, ...).

Gate on the built-in $GITHUB_EVENT_NAME env var in the shell instead,
which keeps the schedule-only reseed behaviour with no caller changes.
This commit is contained in:
Juliusz Sosinowicz
2026-06-15 16:19:48 +00:00
parent 146e1c3d34
commit 8754aee447
+7 -2
View File
@@ -106,10 +106,15 @@ runs:
# so a bad/stale entry can't live forever. The cache is still saved
# (read-only is false on schedule), and PR/push runs are unaffected -
# they keep their warm hits. Cost: the scheduled jobs recompile fully.
# Gate in the shell via the built-in $GITHUB_EVENT_NAME, not a step-level
# `if:` - the `github` context is not available in a composite action's
# step `if:` (it loads as "Unrecognized named-value: 'github'").
- name: Force fresh compiles on scheduled reseed
if: github.event_name == 'schedule'
shell: bash
run: echo "CCACHE_RECACHE=1" >> "$GITHUB_ENV"
run: |
if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then
echo "CCACHE_RECACHE=1" >> "$GITHUB_ENV"
fi
- name: Show ccache stats (initial)
shell: bash