Skip to content

Commit

Permalink
ci: skip entire autoland job for non-bot users (#382)
Browse files Browse the repository at this point in the history
In contributor PRs such as #372 we see that the pr/autoland job fails
due to permissions issues obtaining an app token from a fork.

This job is actually only required to auto-land bot PRs. Instead of
skipping just the auto-land setting step, we should be skipping the
entire thing.

Fixes #381
  • Loading branch information
mmcloughlin authored Mar 6, 2023
1 parent 34ac353 commit 5935b03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
pull_request:
jobs:
automerge:
if: github.actor == 'cadobot[bot]' && !github.event.pull_request.draft
runs-on: ubuntu-latest
steps:
- name: Generate Bot Token
Expand All @@ -14,7 +15,6 @@ jobs:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Automerge Bot Pull Requests
if: github.actor == 'cadobot[bot]' && !github.event.pull_request.draft
run: gh pr merge --auto --squash "${{ github.event.pull_request.html_url }}"
env:
GITHUB_TOKEN: ${{ steps.bot.outputs.token }}

0 comments on commit 5935b03

Please sign in to comment.