Skip to content

Commit bf7893d

Browse files
committed
ci: update config change workflow to detect missing files
Signed-off-by: vprashar2929 <[email protected]>
1 parent 3540698 commit bf7893d

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

.github/workflows/config-change.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ jobs:
1111
check-changes:
1212
runs-on: ubuntu-latest
1313
outputs:
14-
changes: ${{ steps.filter.outputs.changes }}
14+
changes: ${{ steps.filter.outputs.config }}
15+
doc_changes: ${{ steps.filter.outputs.doc }}
16+
compose_changes: ${{ steps.filter.outputs.compose }}
17+
hack_changes: ${{ steps.filter.outputs.hack }}
18+
manifest_changes: ${{ steps.filter.outputs.manifest }}
1519
steps:
1620
- name: Checkout source
1721
uses: actions/checkout@v4
@@ -21,8 +25,16 @@ jobs:
2125
id: filter
2226
with:
2327
filters: |
24-
changes:
28+
config:
2529
- 'config/**/*.go'
30+
doc:
31+
- 'docs/configuration/configuration.md'
32+
compose:
33+
- 'compose/dev/kepler-dev/etc/kepler/config.yaml'
34+
hack:
35+
- 'hack/config.yaml'
36+
manifest:
37+
- 'manifests/k8s/configmap.yaml'
2638
2739
comment-on-pr:
2840
needs: check-changes
@@ -33,9 +45,8 @@ jobs:
3345
uses: thollander/actions-comment-pull-request@v3
3446
with:
3547
message: |
36-
:warning: Config changes detected in this PR.
3748
Please make sure that the config changes are updated in the following places as part of this PR:
38-
- [ ] docs/configuration/configuration.md
39-
- [ ] compose/dev/kepler-dev/etc/kepler/config.yaml
40-
- [ ] hack/config.yaml
41-
- [ ] manifests/k8s/configmap.yaml
49+
${{ needs.check-changes.outputs.doc_changes != 'true' && '- docs/configuration/configuration.md' || '' }}
50+
${{ needs.check-changes.outputs.compose_changes != 'true' && '- compose/dev/kepler-dev/etc/kepler/config.yaml' || '' }}
51+
${{ needs.check-changes.outputs.hack_changes != 'true' && '- hack/config.yaml' || '' }}
52+
${{ needs.check-changes.outputs.manifests_changes != 'true' && '- manifests/k8s/configmap.yaml' || '' }}

config/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"k8s.io/utils/ptr"
1818
)
1919

20-
// Config represents the complete application configuration
2120
type (
2221
Log struct {
2322
Level string `yaml:"level"`

docs/configuration/configuration.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ Kepler supports configuration through both command-line flags and a configuratio
66

77
Kepler supports two primary methods for configuration:
88

9-
1. **Command-line flags**: For quick adjustments and one-time settings
10-
2. **Configuration file**: For persistent and comprehensive configuration
9+
1. **Configuration file**: For persistent and comprehensive configuration
1110

1211
> **Tip:** Command-line flags take precedence over configuration file settings when both are specified.
1312

0 commit comments

Comments
 (0)