Skip to content

Commit ab6c6ae

Browse files
ci: treat dependabot PRs like fork PRs in pre-merge queue
Dependabot creates branches in the main repo (not a fork), so the existing fork check passes — but GitHub withholds repository secrets from Dependabot PRs, leaving CI_ACCESS_APP_PKEY empty and causing create-github-app-token to fail. Add `github.actor != 'dependabot[bot]'` guards alongside the fork checks so dependabot PRs skip secret-dependent steps (app token, sccache, auto-commit) and use the plain checkout path instead. Fixes #5746
1 parent 352a7ae commit ab6c6ae

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/ci-pre-mergequeue.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ jobs:
2626
run: |
2727
echo "K8S node: ${K8S_NODE_NAME}"
2828
29-
- name: Disable sccache for fork PRs (secrets unavailable)
30-
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
29+
- name: Disable sccache for fork/dependabot PRs (secrets unavailable)
30+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]' }}
3131
run: |
3232
echo "RUSTC_WRAPPER=" >> "$GITHUB_ENV"
3333
3434
- name: Generate GitHub App token
35-
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
35+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
3636
id: app-token
3737
uses: actions/create-github-app-token@v2
3838
with:
@@ -41,15 +41,15 @@ jobs:
4141
permission-contents: write
4242

4343
- name: Checkout (internal PRs)
44-
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
44+
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
4545
uses: actions/checkout@v4
4646
with:
4747
# This needs to be set to a token to trigger a follow-up workflow
4848
# in case some changes were corrected.
4949
token: ${{ steps.app-token.outputs.token }}
5050

51-
- name: Checkout (fork PRs)
52-
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
51+
- name: Checkout (fork/dependabot PRs)
52+
if: ${{ github.event.pull_request.head.repo.full_name != github.repository || github.actor == 'dependabot[bot]' }}
5353
uses: actions/checkout@v4
5454

5555
- name: Cache uv pre-commit environments
@@ -80,8 +80,8 @@ jobs:
8080
- name: Print sccache stats
8181
run: sccache --show-stats
8282
- uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403
83-
# Only attempt auto-fix commits for branches in this repo (forks can't be pushed to)
84-
if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository }}
83+
# Only attempt auto-fix commits for internal branches (forks and dependabot can't be pushed to)
84+
if: ${{ always() && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
8585
with:
8686
commit_message: "[ci] apply automatic fixes"
8787
commit_user_name: feldera-bot

0 commit comments

Comments
 (0)