Skip to content

Commit 58f7ba8

Browse files
authored
Use fork code path for Dependabot (#36)
CI is broken on #35 because Dependabot-initiated workflows do not have access to GitHub Actions secrets: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#responding-to-events
1 parent d5b337f commit 58f7ba8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/validate.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,23 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- if: >-
18-
github.event_name != 'pull_request' ||
19-
github.event.pull_request.head.repo.full_name == github.repository
18+
github.actor != 'dependabot[bot]' && (
19+
github.event_name != 'pull_request' ||
20+
github.event.pull_request.head.repo.full_name == github.repository
21+
)
2022
name: Check out repo
2123
uses: actions/checkout@v4
2224
with:
2325
token: ${{ secrets.SEEK_OSS_CI_GITHUB_TOKEN }}
2426
2527
- if: >-
26-
github.event_name == 'pull_request' &&
27-
github.event.pull_request.head.repo.full_name != github.repository
28+
github.actor == 'dependabot[bot]' || (
29+
github.event_name == 'pull_request' &&
30+
github.event.pull_request.head.repo.full_name != github.repository
31+
)
2832
name: Check out repo
2933
uses: actions/checkout@v4
30-
# We don't share secrets with forks.
34+
# We don't share secrets with Dependabot nor forks.
3135
3236
- name: Set up Node.js
3337
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)