@@ -110,6 +110,7 @@ jobs:
110
110
111
111
# helm template doesn't reliably order manifests within the same kind, so use yq to do it for us
112
112
- name : Generate manifests for PR
113
+ id : generate-manifests
113
114
run : |
114
115
mkdir -p "$RUNNER_TEMP/new"
115
116
for values in charts/matrix-stack/ci/*values.yaml; do
@@ -122,6 +123,7 @@ jobs:
122
123
yq ea '[.] | .[] | splitDoc' | \
123
124
yq -s "\"$RUNNER_TEMP/new/$(basename "$values" ".yaml")/\""' + ([.kind, .metadata.name] | join("-") | downcase) + ".yaml"'
124
125
done
126
+ echo "output_dir=$RUNNER_TEMP/new" | tee -a "$GITHUB_OUTPUT"
125
127
126
128
# We want the most recent common ancestor between the target & PR branches rather than the target branch itself
127
129
# There could have been more commits to the target branch since the PR branch was created and we don't want to see
@@ -156,9 +158,19 @@ jobs:
156
158
tool_versions : |
157
159
dyff 1.10.1
158
160
161
+ - name : Upload new manifests
162
+ id : upload-new
163
+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
164
+ with :
165
+ name : new-manifests
166
+ path : ${{ steps.generate-manifests.outputs.output_dir }}
167
+ retention-days : 1
168
+
159
169
- name : dyff old and new manifests
160
170
id : dyff
161
171
shell : bash
172
+ env :
173
+ ARTIFACT_URL : ${{ steps.upload-new.outputs.artifact-url }}
162
174
run : |
163
175
echo "output_dir=$RUNNER_TEMP" | tee -a "$GITHUB_OUTPUT"
164
176
values_directories=$(find "$RUNNER_TEMP/old" "$RUNNER_TEMP/new" -maxdepth 1 -type d | sed -E 's|'"$RUNNER_TEMP"'/(old\|new)||' | sed -E 's|^/||' | sort | uniq)
@@ -182,8 +194,9 @@ jobs:
182
194
file_content=$(sed -e 's/^/+ /' < "$RUNNER_TEMP/new/$templates_file")
183
195
comment_templates_body+="<details><summary>$current_file (added)</summary>\n"
184
196
comment_templates_body+='\n```diff\n'
185
- comment_templates_body+=$file_content
186
- comment_templates_body+='\n```\n</details>\n\n'
197
+ comment_templates_body+="# The full content of the file is available in ${ARTIFACT_URL}\n"
198
+ comment_templates_body+=$(head -n 5 <<< "$file_content")
199
+ comment_templates_body+='\n...\n```\n</details>\n\n'
187
200
continue
188
201
fi
189
202
0 commit comments