File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 with :
2828 ref : ${{ github.head_ref }}
2929 # Enable GitHub auto merge
30- - name : Enable Pull Request Automerge
31- run : gh pr merge --merge --auto
32- env :
33- GH_TOKEN : ${{ secrets.AUTOMERGE }}
30+ # - name: Enable Pull Request Automerge
31+ # run: gh pr merge --merge --auto
32+ # env:
33+ # GH_TOKEN: ${{ secrets.AUTOMERGE }}
Original file line number Diff line number Diff line change 99name : Auto approve renovate PRs
1010
1111on :
12- pull_request : # zizmor: ignore[dangerous-triggers]
12+ pull_request_target : # zizmor: ignore[dangerous-triggers]
1313 branches :
1414 - main
1515 - master
1818permissions :
1919 contents : read
2020
21+ concurrency :
22+ group : renovate-approve-merge-${{ github.head_ref || github.run_id }}
23+ cancel-in-progress : true
24+
2125jobs :
2226 auto-approve-merge :
27+ if : github.event.pull_request.user.login == 'renovate[bot]'
2328 runs-on : ubuntu-latest
29+ permissions :
30+ # for hmarr/auto-approve-action to approve PRs
31+ pull-requests : write
32+ # for alexwilson/enable-github-automerge-action to approve PRs
33+ contents : write
2434
2535 steps :
36+ - name : Disabled on forks
37+ if : ${{ github.event.pull_request.head.repo.full_name != github.repository }}
38+ run : |
39+ echo 'Can not approve PRs from forks'
40+ exit 1
41+
42+ - uses : mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
43+ id : branchname
44+ with :
45+ repo-token : ${{ secrets.GITHUB_TOKEN }}
46+
47+ # GitHub actions bot approve
48+ - uses : hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
49+ if : startsWith(steps.branchname.outputs.branch, 'renovate/')
50+ with :
51+ github-token : ${{ secrets.GITHUB_TOKEN }}
52+
53+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
54+ with :
55+ ref : ${{ github.head_ref }}
56+
2657 # Enable GitHub auto merge
2758 - name : Enable Pull Request Automerge
2859 run : gh pr merge --merge --auto
2960 env :
30- GH_TOKEN : ${{ secrets.AUTOMERGE }}
61+ GH_TOKEN : ${{ secrets.AUTOMERGE }}
You can’t perform that action at this time.
0 commit comments