Skip to content

Commit 8d49c9c

Browse files
authored
Merge pull request #2226 from vprashar2929/ci-cfg-up-2
ci: remove redundant expression for config change comments
2 parents 2b7c860 + 63ff1a4 commit 8d49c9c

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.github/workflows/config-change.yaml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ name: Check Config Changes
22

33
on: #yamllint disable-line rule:truthy
44
pull_request_target:
5-
5+
# Using `pull_request_target` event type to allow the workflow to comment on the PR.
6+
# Refer: https://github.com/thollander/actions-comment-pull-request?tab=readme-ov-file#permissions
67
permissions:
78
pull-requests: write
89
contents: write
@@ -16,6 +17,7 @@ jobs:
1617
compose_changes: ${{ steps.filter.outputs.compose }}
1718
hack_changes: ${{ steps.filter.outputs.hack }}
1819
manifest_changes: ${{ steps.filter.outputs.manifest }}
20+
helm_changes: ${{ steps.filter.outputs.helm }}
1921
steps:
2022
- name: Checkout source
2123
uses: actions/checkout@v4
@@ -35,17 +37,20 @@ jobs:
3537
- 'hack/config.yaml'
3638
manifest:
3739
- 'manifests/k8s/configmap.yaml'
40+
helm:
41+
- 'manifests/helm/kepler/values.yaml'
3842
3943
comment-on-pr:
4044
needs: check-changes
4145
if: >-
42-
${{ needs.check-changes.outputs.changes == 'true' }} &&
43-
(
44-
${{ needs.check-changes.outputs.doc_changes != 'true' }} ||
45-
${{ needs.check-changes.outputs.compose_changes != 'true' }} ||
46-
${{ needs.check-changes.outputs.hack_changes != 'true' }} ||
47-
${{ needs.check-changes.outputs.manifest_changes != 'true' }}
48-
)
46+
needs.check-changes.outputs.changes == 'true' &&
47+
(
48+
needs.check-changes.outputs.doc_changes != 'true' ||
49+
needs.check-changes.outputs.compose_changes != 'true' ||
50+
needs.check-changes.outputs.hack_changes != 'true' ||
51+
needs.check-changes.outputs.manifest_changes != 'true' ||
52+
needs.check-changes.outputs.helm_changes != 'true'
53+
)
4954
runs-on: ubuntu-latest
5055
steps:
5156
- name: Generate comment message
@@ -67,6 +72,9 @@ jobs:
6772
if [[ "${{ needs.check-changes.outputs.manifest_changes }}" != "true" ]]; then
6873
echo "- manifests/k8s/configmap.yaml"
6974
fi
75+
if [[ "${{ needs.check-changes.outputs.helm_changes }}" != "true" ]]; then
76+
echo "- manifests/helm/kepler/values.yaml"
77+
fi
7078
echo "EOF"
7179
} >> $GITHUB_OUTPUT
7280
- name: Comment on PR

0 commit comments

Comments
 (0)