Skip to content

Commit b6cfd6f

Browse files
committed
[actions] don't run Amplify on PRs from forks
GitHub does not mint OIDC tokens for externally sourced PRs so this workflow can't successfully run on those PRs. An alternative solution (like via an approval comment?) should be identified and implemented eventually to allow the workflow for previous contributors using their own forks. This also updates the workflow to run on the develop branch.
1 parent 1bc49ef commit b6cfd6f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/amplify.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request: {}
55
workflow_dispatch: {}
66
push:
7-
branches: ["main"]
7+
branches: ["main", "develop"]
88

99
permissions:
1010
contents: read
@@ -14,9 +14,9 @@ jobs:
1414
amplify-security-scan:
1515
name: Amplify Security Scan
1616
runs-on: ubuntu-latest
17-
if: (github.actor != 'dependabot[bot]')
17+
if: (!github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]')
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
- name: Amplify Runner
2222
uses: amplify-security/runner-action@926f003f3c9695a93cbc4e2f1e64eb784dcacbfc # v0.2.0

0 commit comments

Comments
 (0)