Bump actions/setup-python from 2 to 5 #12
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 and merge Dependabot PRs | |
on: | |
pull_request_target: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
auto-approve: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Auto-approve Dependabot PR | |
if: github.actor == 'dependabot[bot]' | |
uses: hmarr/auto-approve-action@v3 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
auto-merge: | |
needs: auto-approve | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Find PR number | |
id: find_pr | |
run: | | |
PR_NUMBER=$(gh pr list --state open --author "dependabot[bot]" --json number --jq '.[0].number') | |
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_OUTPUT | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Enable auto-merge | |
if: ${{ steps.find_pr.outputs.PR_NUMBER != '' }} | |
run: gh pr merge --auto --squash "${{ steps.find_pr.outputs.PR_NUMBER }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |