Skip to content

Commit

Permalink
Modify workflow for helm CRD file
Browse files Browse the repository at this point in the history
Signed-off-by: hitesh-wani-px <[email protected]>
  • Loading branch information
hitesh-wani-px committed Aug 13, 2024
1 parent 41a37a6 commit 196b0fb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/on-pr-helm-sync.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate STC CRD and Helm Template Sync
name: Validate operator and Helm StorageCluster Sync

on:
pull_request:
Expand Down Expand Up @@ -39,8 +39,6 @@ jobs:
if [[ -z "$HELM_PR_LINK" ]]; then
echo "Error: HELM_PR_LINK is missing in the description."
exit 1
elif [[ "$HELM_PR_LINK" == "NOT_NEEDED" ]]; then
echo "helm_check=skipped" >> $GITHUB_ENV
else
echo "helm_pr_link=true" >> $GITHUB_ENV
echo "helm_pr_link_url=$HELM_PR_LINK" >> $GITHUB_ENV
Expand Down Expand Up @@ -80,15 +78,15 @@ jobs:
repository: portworx/helm
ref: ${{ env.helm_branch }}

- name: Verify Helm Template Changes
- name: Verify Helm StorageCluster Changes
if: env.crd_changed == 'true' && env.helm_pr_link == 'true'
run: |
echo "Checking Helm template changes..."
if git diff --exit-code HEAD^ HEAD -- charts/portworx/templates/storage-cluster.yaml; then
echo "Error: No changes detected in Helm storagecluster template."
if git diff --exit-code HEAD^ HEAD -- charts/portworx/crds/core_v1_storagecluster_crd.yaml; then
echo "Error: No changes detected in Helm storagecluster CRD file."
exit 1
else
echo "Helm storagecluster template changes detected."
echo "Helm storagecluster CRD changes detected."
fi
- name: Final Status
Expand Down

0 comments on commit 196b0fb

Please sign in to comment.