Skip to content

Commit 30f916c

Browse files
authored
ci: auto-merge patch updates (#43)
1 parent 66f990b commit 30f916c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/lcm.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: LCM
2+
3+
on:
4+
pull_request: {}
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
jobs:
11+
dependabot:
12+
runs-on: ubuntu-latest
13+
if: |
14+
github.event.pull_request.user.login == 'dependabot[bot]' &&
15+
github.repository == 'acidghost/a555watch'
16+
steps:
17+
- name: Dependabot metadata
18+
id: metadata
19+
uses: dependabot/fetch-metadata@08eff52bf64351f401fb50d4972fa95b9f2c2d1b # v2.4.0
20+
with:
21+
github-token: ${{ secrets.GITHUB_TOKEN }}
22+
- name: Approve and enable auto-merge
23+
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
24+
run: |
25+
echo "Approving PR"
26+
gh pr review --approve "$PR_URL"
27+
echo "Enabling auto-merge"
28+
gh pr merge --auto --squash "$PR_URL"
29+
env:
30+
PR_URL: ${{ github.event.pull_request.html_url }}
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)