File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,22 @@ jobs:
34
34
git diff
35
35
# Get the links to the changelogs of the updated versions and make them
36
36
# available to the reviewers
37
- {
38
- echo "new_changelogs<<EOF"
39
- scripts/get-new-changelogs.sh
40
- echo EOF
41
- } >> "$GITHUB_OUTPUT"
37
+ # 1) Start the multiline output, unconditionally
38
+ echo "new_changelogs<<EOF" >> "$GITHUB_OUTPUT"
39
+
40
+ # 2) Run the changelog script, capture its exit code,
41
+ # and append its stdout to the output.
42
+ scripts/get-new-changelogs.sh >> "$GITHUB_OUTPUT"
43
+ script_rc=$?
44
+
45
+ # 3) Close the delimiter so Actions can parse the value.
46
+ echo "EOF" >> "$GITHUB_OUTPUT"
47
+
48
+ # 4) If the script failed, re-exit with its code to fail the job.
49
+ if [ $script_rc -ne 0 ]; then
50
+ echo "::error::get-new-changelogs.sh failed with exit code $script_rc"
51
+ exit $script_rc
52
+ fi
42
53
if : matrix.branch == 'main'
43
54
- name : Update jsonnet dependencies
44
55
run : |
You can’t perform that action at this time.
0 commit comments