Skip to content

Commit

Permalink
ci: Unbreak the scorecard workflow
Browse files Browse the repository at this point in the history
* Fix syntax error, other minor touch-ups
* Don't run other workflows when only scorecard.yml changes

Signed-off-by: Larry Gritz <lg@larrygritz.com>
  • Loading branch information
lgritz committed Jan 25, 2025
1 parent 9979a27 commit 13711c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
- '!**.rst'
- '!**/ci.yml'
- '!**/docs.yml'
- '!**/scorecard.yml'
- '!**.properties'
- '!docs/**'
# Run analysis on PRs only if the branch name indicates that the purpose of
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- '!**.rst'
- '!**/analysis.yml'
- '!**/docs.yml'
- '!**/scorecard.yml'
- '!**.properties'
- '!docs/**'
pull_request:
Expand Down
17 changes: 5 additions & 12 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,12 @@ on:
# Only the default branch is supported.
branch_protection_rule:
push:
# Run on pushes to main, but only the main repo, not forks
branches: [ "main" ]
# Run on pushes to main, but only the official repo, not forks
if: github.event.pull_request.head.repo.full_name == github.repository
paths-ignore:
- '**.md'
- '**.rst'
- 'docs/**'
pull_request:
# Only run on individual PRs if the workflow file itself is changed.
paths-ignore:
- '**.md'
- '**.rst'
- 'docs/**'
# Only run on individual PRs if the workflows changed
paths:
- '.github/workflows/**'

# Declare default permissions as read only.
permissions: read-all
Expand All @@ -47,7 +40,7 @@ jobs:

steps:
- name: "Checkout code"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
fetch-depth: '0'
Expand Down

0 comments on commit 13711c1

Please sign in to comment.