Skip to content

Commit 577c052

Browse files
authored
ci: automerge updates to dependencies after running tests (#239)
1 parent 9ae0867 commit 577c052

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/dependencies.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@ on:
44
- cron: "0 0 * * *"
55
workflow_dispatch:
66
jobs:
7+
dependabot:
8+
name: "@dependabot"
9+
if: github.event.pull_request.user.login == 'dependabot[bot]'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
steps:
15+
- name: Collect metadata
16+
id: metadata
17+
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
18+
with:
19+
github-token: "${{ secrets.GITHUB_TOKEN }}"
20+
- name: Approve
21+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
22+
run: gh pr review --approve "$PR_URL"
23+
env:
24+
PR_URL: ${{github.event.pull_request.html_url}}
25+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
- name: Automerge
27+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
28+
run: gh pr merge --auto --squash "$PR_URL"
29+
env:
30+
PR_URL: ${{ github.event.pull_request.html_url }}
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
732
golang:
833
name: Bump the Golang version
934
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)