Skip to content

Commit fcd34c0

Browse files
authored
fix: trigger scorecard on default branch events, not releases (#624)
The OSSF Scorecard action only supports the repository default branch. Triggering on release (created) runs against the tag ref (e.g. 2.3.0-rc.1) and fails with 'only default branch is supported', breaking every RC/release. Switch to the OSSF-recommended triggers: push to main, a weekly schedule, and branch_protection_rule changes.
1 parent ff8a827 commit fcd34c0

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/scorecard.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,17 @@
1010

1111
name: Scorecard supply-chain security
1212

13+
# Scorecard only supports the repository's default branch. Release/tag events
14+
# check out a tag ref and fail with "only default branch is supported", so we
15+
# trigger on the OSSF-recommended events instead: pushes to the default branch,
16+
# a weekly schedule, and branch-protection-rule changes.
1317
on:
14-
release:
15-
types: [created]
18+
push:
19+
branches: [main]
20+
schedule:
21+
# Weekly, Mondays at 07:20 UTC.
22+
- cron: '20 7 * * 1'
23+
branch_protection_rule:
1624

1725
# Top-level read-all permissions; jobs override what they need.
1826
permissions: read-all

0 commit comments

Comments
 (0)