GHA security cleanup #225
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-merge Dependabot PRs | |
on: | |
pull_request_target: | |
branches: [main] | |
jobs: | |
# | |
# Automatically review dependabot PRs and set them to automerge (on successful checks) | |
# | |
Automerge: | |
runs-on: ubuntu-latest | |
if: github.actor == 'dependabot[bot]' | |
env: | |
GH_TOKEN: ${{ github.token }} | |
GH_REPO: ${{ github.repository }} | |
GH_PR: ${{ github.event.pull_request.number }} | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Set auto-merge | |
run: gh pr merge -R "$GH_REPO" --merge --auto "$GH_PR" | |
- name: Review PR | |
run: gh pr review -R "$GH_REPO" --approve "$GH_PR" |