Skip to content

Commit a755bbd

Browse files
authored
Merge pull request #4505 from Kobzol/ci-gh-app
Use GH app for authenticating pull PRs
2 parents fc4d9a2 + 4325987 commit a755bbd

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,13 @@ jobs:
169169
run: rustup toolchain install nightly --profile minimal
170170
- name: Install rustup-toolchain-install-master
171171
run: cargo install -f rustup-toolchain-install-master
172-
- name: Push changes to a branch and create PR
172+
# Create a token for the next step so it can create a PR that actually runs CI.
173+
- uses: actions/create-github-app-token@v2
174+
id: app-token
175+
with:
176+
app-id: ${{ vars.APP_CLIENT_ID }}
177+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
178+
- name: pull changes from rustc and create PR
173179
run: |
174180
# Make it easier to see what happens.
175181
set -x
@@ -200,7 +206,7 @@ jobs:
200206
git push -u origin $BRANCH
201207
gh pr create -B master --title 'Automatic Rustup' --body 'Please close and re-open this PR to trigger CI, then enable auto-merge.'
202208
env:
203-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
209+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
204210

205211
cron-fail-notify:
206212
name: cronjob failure notification

triagebot.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ new_pr = true
5050
[autolabel."S-waiting-on-author"]
5151
new_draft = true
5252

53-
# Automatically close and reopen PRs made by bots to run CI on them
54-
[bot-pull-requests]
55-
5653
# Canonicalize issue numbers to avoid closing the wrong issue when upstreaming this subtree
5754
[canonicalize-issue-links]
5855

0 commit comments

Comments
 (0)