Skip to content

Commit

Permalink
Fix permissions and run conditions on workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
wbrawner committed Mar 28, 2024
1 parent c3e566b commit fdd594f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: Enable Auto Merge
on: pull_request

permissions:
contents: write
pull-requests: write
on:
pull_request_target:
types:
- opened
- reopened
- edited
branches:
- main

jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'wbrawner' || github.actor == 'dependabot[bot]' }}
steps:
- name: Enable auto-merge for Dependabot PRs
- name: Enable auto-merge
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Test
on:
pull_request:

permissions:
statuses: write
checks: write

jobs:
validate:
runs-on: ubuntu-latest
Expand Down

0 comments on commit fdd594f

Please sign in to comment.