Skip to content

Commit b258def

Browse files
committed
fix(ci): harden CI workflows before first release
- ci.yml: restrict push trigger to main branch (PRs cover feature branches) - auto-approve.yml: switch to github.actor for re-approval on maintainer pushes - dependabot.yml: add labels and group GitHub Actions bumps into single PRs Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent 067f740 commit b258def

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ updates:
44
directory: /
55
schedule:
66
interval: weekly
7+
labels:
8+
- dependencies
79
open-pull-requests-limit: 10
810

911
- package-ecosystem: github-actions
1012
directory: /
1113
schedule:
1214
interval: weekly
15+
labels:
16+
- dependencies
1317
open-pull-requests-limit: 5
18+
groups:
19+
actions:
20+
patterns:
21+
- "*"

.github/workflows/auto-approve.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
contents: write
2121
pull-requests: write
2222
if: >
23-
github.event.pull_request.user.login == 'SebTardif' ||
24-
github.event.pull_request.user.login == 'dependabot[bot]' ||
25-
github.event.pull_request.user.login == 'github-actions[bot]'
23+
github.actor == 'SebTardif' ||
24+
github.actor == 'dependabot[bot]' ||
25+
github.actor == 'github-actions[bot]'
2626
steps:
2727
- name: Harden runner
2828
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: ci
22

33
on:
44
push:
5+
branches: [main]
56
pull_request:
67
merge_group:
78
workflow_dispatch:

0 commit comments

Comments
 (0)