Skip to content

Commit 5468a16

Browse files
authored
Merge pull request #2189 from sustainable-computing-io/ci-cfg-chk
ci: enable comment on PR in case of config change
2 parents a62cf34 + bb2e462 commit 5468a16

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/config-change.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Check Config Changes
2+
3+
on: #yamllint disable-line rule:truthy
4+
pull_request_target:
5+
branches: [reboot]
6+
7+
permissions:
8+
pull-requests: write
9+
contents: write
10+
11+
jobs:
12+
check-changes:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
changes: ${{ steps.filter.outputs.changes }}
16+
steps:
17+
- name: Checkout source
18+
uses: actions/checkout@v4
19+
20+
- name: Filter changes
21+
uses: dorny/paths-filter@v3
22+
id: filter
23+
with:
24+
filters: |
25+
changes:
26+
- 'config/**/*.go'
27+
28+
comment-on-pr:
29+
needs: check-changes
30+
if: needs.check-changes.outputs.changes == 'true'
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Comment on PR
34+
uses: thollander/actions-comment-pull-request@v3
35+
with:
36+
message: |
37+
:warning: Config changes detected in this PR.
38+
Please make sure that the config changes are updated in the following places as part of this PR:
39+
- docs/configuration/configuration.md
40+
- compose/dev/kepler-dev/etc/kepler/config.yaml
41+
- hack/config.yaml
42+
- manifests/k8s/configmap.yaml

0 commit comments

Comments
 (0)