|
11 | 11 | runs-on: ubuntu-latest
|
12 | 12 | if: ${{ github.actor == 'dependabot[bot]' }}
|
13 | 13 | steps:
|
14 |
| - - name: Dependabot metadata |
15 |
| - id: dependabot-metadata |
16 |
| - uses: dependabot/fetch-metadata@v1 |
17 |
| - with: |
18 |
| - github-token: "${{ secrets.GITHUB_TOKEN }}" |
19 |
| - - name: Enable auto-merge for Dependabot PRs |
20 |
| - run: gh pr merge --auto --squash "$PR_URL" |
21 |
| - env: |
22 |
| - PR_URL: ${{github.event.pull_request.html_url}} |
23 |
| - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
24 |
| - - name: Approve patch updates |
25 |
| - if: ${{steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch'}} |
26 |
| - run: gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a patch update**" |
27 |
| - env: |
28 |
| - PR_URL: ${{github.event.pull_request.html_url}} |
29 |
| - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
30 |
| - - name: Approve major and minor updates of development dependencies |
31 |
| - if: ${{(steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major'|| steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor') && steps.dependabot-metadata.outputs.dependency-type == 'direct:development'}} |
32 |
| - run: gh pr review $PR_URL --approve -b "I'm **approving** this pull request because **it includes a major or minor update of a dependency used only in development**" |
33 |
| - env: |
34 |
| - PR_URL: ${{github.event.pull_request.html_url}} |
35 |
| - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
36 |
| - - name: Comment on major and minor updates of non-development dependencies |
37 |
| - if: ${{(steps.dependabot-metadata.outputs.update-type == 'version-update:semver-major'|| steps.dependabot-metadata.outputs.update-type == 'version-update:semver-minor') && steps.dependabot-metadata.outputs.dependency-type == 'direct:production'}} |
38 |
| - run: | |
39 |
| - gh pr comment $PR_URL --body "I'm **not approving** this PR because **it includes a major or minor update of a dependency used in production**" |
40 |
| - gh pr edit $PR_URL --add-label "requires-manual-qa" |
41 |
| - env: |
42 |
| - PR_URL: ${{github.event.pull_request.html_url}} |
43 |
| - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
| 14 | + - name: Enable Dependabot automation |
| 15 | + uses: mozilla/syseng-pod/actions/dependabot-automerge@main |
0 commit comments