Skip to content

Commit

Permalink
Don't run some GHA workflows in forks. (#296)
Browse files Browse the repository at this point in the history
Some workflows can only run without error while triggered from this
repo. Whenever they get triggered from a fork they fail. So, prevent
them from running on forks.

Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>
  • Loading branch information
mihaimaruseac authored Aug 19, 2024
1 parent b16ce61 commit 69ccdc9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
jobs:
analyze:
name: Analyze
if: github.repository == 'sigstore/model-transparency' # Don't do this in forks
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ permissions:
jobs:
dependency-review:
name: License and Vulnerability Scan
if: github.repository == 'sigstore/model-transparency' # Don't do this in forks
uses: sigstore/community/.github/workflows/reusable-dependency-review.yml@8cc8d600fbf3012b9d9d84a499423fa96afa3765
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ permissions:

jobs:
build:
if: github.repository == 'sigstore/model-transparency' # Don't do this in forks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ permissions: read-all
jobs:
analysis:
name: Scorecard analysis
if: github.repository == 'sigstore/model-transparency' # Don't do this in forks
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
Expand Down

0 comments on commit 69ccdc9

Please sign in to comment.