Fix permissions and run conditions on workflows

This commit is contained in:
William Brawner 2024-03-27 21:55:37 -06:00
parent c3e566ba1c
commit fdd594f66c
2 changed files with 13 additions and 6 deletions

View file

@ -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}}

View file

@ -3,6 +3,10 @@ name: Test
on:
pull_request:
permissions:
statuses: write
checks: write
jobs:
validate:
runs-on: ubuntu-latest