Skip to content

Commit 52e3d7b

Browse files
authored
ci: Attempt harden update versions script (#2696)
1 parent 673e352 commit 52e3d7b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/versions.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,20 @@ jobs:
3434
git diff
3535
# Get the links to the changelogs of the updated versions and make them
3636
# available to the reviewers
37-
# 1) Start the multiline output, unconditionally
37+
38+
# 1) Open the multiline output
3839
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.
40+
41+
# 2) Run changelog script without exiting on error
42+
set +e
4243
scripts/get-new-changelogs.sh >> "$GITHUB_OUTPUT"
4344
script_rc=$?
44-
45-
# 3) Close the delimiter so Actions can parse the value.
45+
set -e
46+
47+
# 3) Close the multiline output
4648
echo "EOF" >> "$GITHUB_OUTPUT"
47-
48-
# 4) If the script failed, re-exit with its code to fail the job.
49+
50+
# 4) Fail if the script actually errored
4951
if [ $script_rc -ne 0 ]; then
5052
echo "::error::get-new-changelogs.sh failed with exit code $script_rc"
5153
exit $script_rc

0 commit comments

Comments
 (0)