Skip to content

Commit

Permalink
gha: standardize build results.
Browse files Browse the repository at this point in the history
  • Loading branch information
baracudda committed Jun 27, 2023
1 parent 98d2334 commit 5738878
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/build-image-result.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,19 @@ on:
- build_image_error

jobs:
build_success:
if: github.event.client_payload.error_msg == ''
build_result:
name: "Build Result [#${{ github.event.client_payload.run_number }}]"
runs-on: ubuntu-latest
env:
RUN_URL: "[Run #${{ github.event.client_payload.run_number }}](${{ github.event.client_payload.run_url }})"
steps:
- name: Display Msg
- name: "Display Error Msg"
if: github.event.client_payload.error_msg != ''
run: |-
echo "::notice::${{ github.event.client_payload.name }} image built with tag [${{ github.event.client_payload.tag }}]"
#endjob build_success

build_error:
if: github.event.client_payload.error_msg != ''
runs-on: ubuntu-latest
steps:
- name: Display Msg
run: |-
echo "${{ github.event.client_payload.error_msg }}"
echo -e "::error::${RUN_URL}%0A${{ github.event.client_payload.error_msg }}"
exit 1
#endjob build_error
- name: "Display Success Msg"
if: github.event.client_payload.build_msg != ''
run: |-
echo -e "::notice::${RUN_URL}%0A${{ github.event.client_payload.build_msg }}"
#endjob build_result

0 comments on commit 5738878

Please sign in to comment.