2424 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525 with :
2626 fetch-depth : 0
27+ persist-credentials : false
2728
2829 - name : " Git safe directory"
2930 run : git config --global --add safe.directory $GITHUB_WORKSPACE
@@ -45,15 +46,16 @@ jobs:
4546
4647 - name : " Merge Changed Subfolders"
4748 id : merge-changed-projects
49+ env :
50+ APPS_CHANGED_PROJECTS : ${{ steps.discover-changes-apps.outputs.changed_projects }}
51+ CHARTS_CHANGED_PROJECTS : ${{ steps.discover-changes-charts.outputs.changed_projects }}
4852 run : |
4953 # TODO: Is there a better way to merge the two arrays in GHA?
50- apps_changed_projects='${{ steps.discover-changes-apps.outputs.changed_projects }}'
51- charts_changed_projects='${{ steps.discover-changes-charts.outputs.changed_projects }}'
52- echo "Changed Projects in apps: $apps_changed_projects"
53- echo "Changed Projects in charts: $charts_changed_projects"
54+ echo "Changed Projects in apps: $APPS_CHANGED_PROJECTS"
55+ echo "Changed Projects in charts: $CHARTS_CHANGED_PROJECTS"
5456
5557 # Merge the two arrays (add 'apps/' and 'charts/') and remove empty strings (if any)
56- all_changed_projects=$(jq -c -n --argjson a "$apps_changed_projects " --argjson b "$charts_changed_projects " '
58+ all_changed_projects=$(jq -c -n --argjson a "$APPS_CHANGED_PROJECTS " --argjson b "$CHARTS_CHANGED_PROJECTS " '
5759 ($a | map(select(. != "") | "apps/" + .)) +
5860 ($b | map(select(. != "") | "charts/" + .))
5961 ')
@@ -86,19 +88,18 @@ jobs:
8688 run_docker_build : true
8789 run_helm_build : true
8890 run_artifact : false
89- secrets : inherit
9091 final-check :
9192 runs-on : ubuntu-latest
9293 if : ${{ always() }}
9394 needs : [pre-merge]
9495 steps :
9596 - name : Final Status Check
97+ env :
98+ PRE_MERGE_PIPELINE_RESULT : ${{ needs.pre-merge.result }}
9699 run : |
97- pre_merge_pipeline_result="${{ needs.pre-merge.result }}"
98-
99- echo "Pre-merge pipeline result: $pre_merge_pipeline_result"
100+ echo "Pre-merge pipeline result: $PRE_MERGE_PIPELINE_RESULT"
100101
101- if [ "$pre_merge_pipeline_result " == "success" ] || [ "$pre_merge_pipeline_result " == "skipped" ]; then
102+ if [ "$PRE_MERGE_PIPELINE_RESULT " == "success" ] || [ "$PRE_MERGE_PIPELINE_RESULT " == "skipped" ]; then
102103 echo "Pre-merge check passed successfully."
103104 else
104105 echo "Pre-merge checks failed. PR can't get merged"
0 commit comments