File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Dependabot PR Approval and Merge
2+ # This workflow automatically approves and merges pull requests created by Dependabot.
3+
4+ on :
5+ push :
6+ branches :
7+ - main
8+ pull_request :
9+
10+
11+ permissions :
12+ contents : write
13+ pull-requests : write
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+
22+ dependabot :
23+ needs : [ build ] # <-- important!
24+ runs-on : ubuntu-latest
25+ permissions :
26+ pull-requests : write
27+ contents : write
28+ if : ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}}
29+ steps :
30+ - id : metadata
31+ uses : dependabot/fetch-metadata@v2
32+ with :
33+ github-token : " ${{ secrets.GITHUB_TOKEN }}"
34+ - run : |
35+ gh pr merge --squash --auto "$PR_URL"
36+ env:
37+ PR_URL: ${{github.event.pull_request.html_url}}
38+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
You can’t perform that action at this time.
0 commit comments