Skip to content

Commit 6869ce3

Browse files
authored
Run scorecard in PRs and on workflow_dispatch (#2456)
1 parent 4da4e8c commit 6869ce3

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/scorecard.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ on:
1313
- cron: "34 3 * * 3"
1414
push:
1515
branches: ["main"]
16+
pull_request:
17+
workflow_dispatch:
1618

1719
permissions: {}
1820

1921
jobs:
2022
analysis:
2123
name: Scorecard analysis
2224
runs-on: ubuntu-24.04
23-
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
24-
if: github.event.repository.default_branch == github.ref_name
2525
permissions:
2626
# Needed by actions/checkout and Scorecard to read the repository contents.
2727
contents: read
@@ -56,7 +56,9 @@ jobs:
5656
# For private repositories:
5757
# - `publish_results` will always be set to `false`, regardless
5858
# of the value entered here.
59-
publish_results: true
59+
#
60+
# publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
61+
publish_results: ${{ github.event.repository.default_branch == github.ref_name }}
6062

6163
# (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
6264
# file_mode: git

0 commit comments

Comments
 (0)