Bump path-to-regexp and express #16
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-approve Dependabot pull requests targeting `main` | |
on: | |
pull_request: | |
branches: | |
- main | |
permissions: | |
# Needed for automatic approval | |
pull-requests: write | |
# Needed for automatic merge | |
contents: write | |
jobs: | |
dependabot_approve_and_merge: | |
runs-on: ubuntu-latest | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
steps: | |
- name: Generate token | |
id: generate_token | |
uses: tibdex/[email protected] | |
with: | |
app_id: ${{ secrets.BOT_APP_ID }} | |
private_key: ${{ secrets.BOT_PRIVATE_KEY }} | |
- name: Authenticate CLI | |
run: echo "${{ steps.generate_token.outputs.token }}" | gh auth login --with-token | |
- name: Approve Dependabot PR | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
run: gh pr review "$PR_URL" --approve | |
- name: Enable auto-merge for Dependabot PR | |
run: gh pr merge "$PR_URL" --auto --merge --delete-branch | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} |