Skip to content

Commit 933831d

Browse files
committed
ci: refactor auto-merge workflow and update flake-lock config
Rename automerge job to merge, restrict trigger to dependabot[bot] only, and add approval comment. Configure git author and committer details for flake-lock updates. Signed-off-by: Svetlin Ralchev <iamralch@users.noreply.github.com>
1 parent 67c2061 commit 933831d

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/workflows/merge.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@ on:
44
pull_request:
55
types: [opened, reopened]
66

7-
permissions:
8-
contents: write
9-
pull-requests: write
7+
defaults:
8+
run:
9+
shell: bash
1010

1111
jobs:
12-
automerge:
13-
if: github.actor == 'dependabot[bot]' || github.actor == 'github-actions[bot]'
12+
merge:
13+
if: github.actor == 'dependabot[bot]'
1414
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
timeout-minutes: 5
1519
steps:
1620
- name: Enable auto-merge
1721
env:
1822
GH_TOKEN: ${{ github.token }}
1923
PR_URL: ${{ github.event.pull_request.html_url }}
2024
run: |
21-
gh pr review --approve "$PR_URL"
25+
gh pr review --approve --body "LGTM" "$PR_URL"
2226
gh pr merge --auto --squash "$PR_URL"

.github/workflows/update.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
- cron: "0 0 * * 1"
66
workflow_dispatch:
77

8-
permissions:
9-
contents: write
10-
pull-requests: write
11-
128
jobs:
139
update:
1410
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
timeout-minutes: 30
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v6
@@ -26,3 +26,9 @@ jobs:
2626
uses: DeterminateSystems/update-flake-lock@v28
2727
with:
2828
pr-labels: dependencies
29+
pr-title: "chore(flake): update flake.lock"
30+
commit-msg: "chore(flake): update flake.lock"
31+
git-author-name: dependabot[bot]
32+
git-author-email: dependabot[bot]@users.noreply.github.com
33+
git-committer-name: dependabot[bot]
34+
git-committer-email: dependabot[bot]@users.noreply.github.com

0 commit comments

Comments
 (0)