Skip to content

Commit 58385c7

Browse files
[CONFIG] Possible fix for regression in CI/CD (- WIP #338 -)
Changes in file .github/workflows/CI-BUILD.yml: * move path to env * added some debug code to failure areao
1 parent bb4914c commit 58385c7

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

.github/workflows/CI-BUILD.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -248,32 +248,39 @@ jobs:
248248
BUILD_ID: ${{ github.run_id }}
249249
BUILD_SHA: ${{ github.sha }}
250250
BUILD_ARTIFACT_FILES: ${{ steps.output_artifact_files.outputs.files }}
251+
BUILD_COMMENT_BODY: '${{ github.workspace }}/BUILD_COMMENT_BODY_${{ github.sha }}.md'
251252
shell: bash
252253
run: |
253-
printf "%s\n" "## :building_construction: Build" > "${{ github.workspace }}/BUILD_COMMENT_BODY_${BODY_SHA}.md"
254-
printf "%s\n" ":ballot_box_with_check: BUILD \`${BUILD_ID}\` succeeded with commit [${BUILD_SHA}](https://github.com/reactive-firewall/multicast/commit/${BUILD_SHA})" >> "${{ github.workspace }}/BUILD_COMMENT_BODY_${BODY_SHA}.md"
254+
printf "%s\n" "## :building_construction: Build" > "${BUILD_COMMENT_BODY}"
255+
printf "%s\n" ":ballot_box_with_check: BUILD \`${BUILD_ID}\` succeeded with commit [${BUILD_SHA}](https://github.com/reactive-firewall/multicast/commit/${BUILD_SHA})" >> "${BUILD_COMMENT_BODY}"
255256
if [[ ( -d dist ) ]] ; then
256257
for BLD_FILE in ${BUILD_ARTIFACT_FILES} ; do
257-
printf "%s\n" " * Including building the file \`${BLD_FILE}\`" >> "${{ github.workspace }}/BUILD_COMMENT_BODY_${BODY_SHA}.md"
258+
printf "%s\n" " * Including building the file \`${BLD_FILE}\`" >> "${BUILD_COMMENT_BODY}"
258259
done
259-
printf "%s\n" " * Including producing the build artifact [multicast-build-${BUILD_SHA}](https://github.com/reactive-firewall/multicast/actions/runs/${BUILD_ID}#artifacts)" >> "${{ github.workspace }}/BUILD_COMMENT_BODY_${BODY_SHA}.md"
260+
printf "%s\n" " * Including producing the build artifact [multicast-build-${BUILD_SHA}](https://github.com/reactive-firewall/multicast/actions/runs/${BUILD_ID}#artifacts)" >> "${BUILD_COMMENT_BODY}"
260261
fi
261-
cat <"${{ github.workspace }}/BUILD_COMMENT_BODY_${BODY_SHA}.md" >> "$GITHUB_STEP_SUMMARY"
262+
cat <"${BUILD_COMMENT_BODY}" >> "$GITHUB_STEP_SUMMARY"
263+
ls -lap "${BUILD_COMMENT_BODY}"
264+
cat <"${BUILD_COMMENT_BODY}"
262265
if: ${{ success() && (github.repository == 'reactive-firewall/multicast') }}
263266
- name: "Summarize Build (FAILED)"
264267
id: summarize-build-failure
265268
env:
266269
BUILD_ID: ${{ github.run_id }}
267270
BUILD_SHA: ${{ github.sha }}
271+
BUILD_COMMENT_BODY: '${{ github.workspace }}/BUILD_COMMENT_BODY_${{ github.sha }}.md'
268272
shell: bash
269273
run: |
270-
printf "%s\n" "## :construction: Build" > "${{ github.workspace }}/BUILD_COMMENT_BODY_${BODY_SHA}.md"
271-
printf "%s\n" ":x: ~BUILD ${BUILD_ID} succeeded with commit [${BUILD_SHA}](https://github.com/reactive-firewall/multicast/commit/${BUILD_SHA})~" > "${{ github.workspace }}/BUILD_COMMENT_BODY_${BODY_SHA}.md"
272-
cat <"${{ github.workspace }}/BUILD_COMMENT_BODY_${BODY_SHA}.md" >> "$GITHUB_STEP_SUMMARY"
274+
printf "%s\n" "## :construction: Build" > "${BUILD_COMMENT_BODY}"
275+
printf "%s\n" ":x: ~BUILD ${BUILD_ID} succeeded with commit [${BUILD_SHA}](https://github.com/reactive-firewall/multicast/commit/${BUILD_SHA})~" > "${BUILD_COMMENT_BODY}"
276+
cat <"${BUILD_COMMENT_BODY}" >> "$GITHUB_STEP_SUMMARY"
277+
ls -lap "${BUILD_COMMENT_BODY}"
278+
cat <"${BUILD_COMMENT_BODY}"
273279
if: ${{ failure() && (github.repository == 'reactive-firewall/multicast') }}
274280
- name: "Build commit comment"
275-
if: ${{ success() && (github.repository == 'reactive-firewall/multicast') }}
276-
id: mats_commit_comment
281+
if: ${{ !cancelled() && (github.repository == 'reactive-firewall/multicast') }}
282+
id: build_commit_comment
277283
uses: peter-evans/commit-comment@5a6f8285b8f2e8376e41fe1b563db48e6cf78c09 # v3.0.0
278284
with:
285+
sha: ${{ github.sha }}
279286
body-path: '${{ github.workspace }}/BUILD_COMMENT_BODY_${{ github.sha }}.md'

0 commit comments

Comments
 (0)