-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Improve/stabilize lint Helm CI workflow
Only post the `Kubeconform Output` comment (on the affected GH PR) in case `kubeconform_min_k8s_version` OR `kubeconform_latest_k8s_version` is failed, not when they're `skipped` (e.g., in case a previous step fails). Signed-off-by: Philip Schmid <[email protected]>
- Loading branch information
1 parent
ed28783
commit b4f1eb4
Showing
1 changed file
with
7 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ on: | |
- '.github/workflows/lint-helm.yaml' | ||
workflow_call: | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
env: | ||
MIN_K8S_VERSION: "1.23.0" | ||
# renovate: datasource=python-version | ||
|
@@ -51,6 +54,7 @@ jobs: | |
|
||
# Validate Helm chart | ||
- name: Generate Helm chart | ||
id: generate_helm_chart | ||
run: | | ||
make -C install/kubernetes | ||
- name: Validate generated files | ||
|
@@ -63,13 +67,15 @@ jobs: | |
# (Re-)run Kubeconform checks explicitly once again to catch specific errors in that regard (to get the STDOUT/STDERR) | ||
- name: Run Kubeconform with minimum supported K8s version | ||
if: success() || steps.generate_helm_chart.outcome == 'failure' | ||
id: kubeconform_min_k8s_version | ||
uses: mathiasvr/[email protected] | ||
with: | ||
shell: bash | ||
run: | | ||
make -C install/kubernetes kubeconform K8S_VERSION=${{ env.MIN_K8S_VERSION }} | ||
- name: Run Kubeconform with latest K8s version | ||
if: success() || steps.generate_helm_chart.outcome == 'failure' | ||
id: kubeconform_latest_k8s_version | ||
uses: mathiasvr/[email protected] | ||
with: | ||
|
@@ -79,7 +85,7 @@ jobs: | |
# Post Kubeconform issues as comment on the GH PR, if there are any | ||
- name: Comment Kubeconform Output | ||
if: failure() && (steps.kubeconform_min_k8s_version.outcome != 'success' || steps.kubeconform_latest_k8s_version.outcome != 'success') | ||
if: failure() && (steps.kubeconform_min_k8s_version.outcome == 'failure' || steps.kubeconform_latest_k8s_version.outcome == 'failure') | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
hide_and_recreate: true | ||
|