Fix permissions and run conditions on workflows
This commit is contained in:
parent
c3e566ba1c
commit
fdd594f66c
2 changed files with 13 additions and 6 deletions
15
.github/workflows/auto-merge.yml
vendored
15
.github/workflows/auto-merge.yml
vendored
|
@ -1,16 +1,19 @@
|
||||||
name: Enable Auto Merge
|
name: Enable Auto Merge
|
||||||
on: pull_request
|
on:
|
||||||
|
pull_request_target:
|
||||||
permissions:
|
types:
|
||||||
contents: write
|
- opened
|
||||||
pull-requests: write
|
- reopened
|
||||||
|
- edited
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-merge:
|
auto-merge:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.actor == 'wbrawner' || github.actor == 'dependabot[bot]' }}
|
if: ${{ github.actor == 'wbrawner' || github.actor == 'dependabot[bot]' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Enable auto-merge for Dependabot PRs
|
- name: Enable auto-merge
|
||||||
run: gh pr merge --auto --rebase "$PR_URL"
|
run: gh pr merge --auto --rebase "$PR_URL"
|
||||||
env:
|
env:
|
||||||
PR_URL: ${{github.event.pull_request.html_url}}
|
PR_URL: ${{github.event.pull_request.html_url}}
|
||||||
|
|
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
@ -3,6 +3,10 @@ name: Test
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
statuses: write
|
||||||
|
checks: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate:
|
validate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
Loading…
Reference in a new issue