Skip to content

Commit d946e32

Browse files
authored
Swap Dependabot for Renovate to auto approve AWS dependencies (#2850)
* Swap Dependabot for Renovate to auto approve AWS dependencies * Update approve-dependencies.yml
1 parent e30dd2f commit d946e32

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/approve-dependencies.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
1-
name: Auto-approve AWSSDK dependency updates
1+
name: Auto-merge AWSSDK dependency updates
22
on:
3-
pull_request_target:
4-
types: [ opened ]
3+
pull_request:
4+
types: [ opened, synchronize ]
55
permissions:
66
pull-requests: write
77
contents: write
88
defaults:
99
run:
1010
shell: bash
1111
jobs:
12-
dependabot:
12+
renovate:
13+
if: startsWith(github.head_ref, 'renovate/') && contains(github.event.pull_request.title, 'AWSSDK')
1314
runs-on: ubuntu-latest
14-
# Prevent run from failing on non-Dependabot PRs
15-
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
1615
steps:
17-
- name: Dependabot metadata
18-
id: metadata
19-
uses: dependabot/[email protected]
2016
- name: Approve PR
21-
if: ${{contains(steps.metadata.outputs.dependency-names, 'AWSSDK.SQS') || contains(steps.metadata.outputs.dependency-names, 'AWSSDK.SimpleNotificationService') || contains(steps.metadata.outputs.dependency-names, 'AWSSDK.S3')}}
2217
run: gh pr review --approve "$PR_URL"
2318
env:
2419
PR_URL: ${{github.event.pull_request.html_url}}
2520
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2621
- name: Enable auto-merge
27-
if: ${{contains(steps.metadata.outputs.dependency-names, 'AWSSDK.SQS') || contains(steps.metadata.outputs.dependency-names, 'AWSSDK.SimpleNotificationService') || contains(steps.metadata.outputs.dependency-names, 'AWSSDK.S3')}}
2822
run: gh pr merge --auto --squash "$PR_URL"
2923
env:
3024
PR_URL: ${{github.event.pull_request.html_url}}

0 commit comments

Comments
 (0)