Skip to content

Commit

Permalink
feat: allow to set an extra message
Browse files Browse the repository at this point in the history
Change-Id: I7499bc98c492d3dccad62c1682f3080121bb1c2b
  • Loading branch information
sileht committed Apr 25, 2024
1 parent e3b809b commit 92100bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
message:
description: message to post on Slack
default: ""
extra_message:
description: message to append to autogenerate message
default: ""
job_url:
description: deprecated not used anymore
default: ""
Expand Down Expand Up @@ -59,6 +62,7 @@ runs:
JOB_STATUS: ${{ job.status }}
REF_NAME: ${{ github.ref_name }}
OVERRIDE_JOB_STATUS: ${{ inputs.OVERRIDE_JOB_STATUS }}
EXTRA_MESSAGE: ${{ inputs.extra_message }}
run: |
if [ "${OVERRIDE_JOB_STATUS}" ]; then
JOB_STATUS="${OVERRIDE_JOB_STATUS}"
Expand Down Expand Up @@ -90,6 +94,7 @@ runs:
SLACK_TEXT_MESSAGE=$(cat <<EOF
*Release (${JOB_ID}) of $PROJECT ${REF_NAME} finished ${emoji}*
Conclusion: ${JOB_STATUS}
${EXTRA_MESSAGE}
EOF
)
Expand All @@ -104,12 +109,14 @@ runs:
\`\`\`
$(git log -1 | sed -e 's/```/~~~/g')
\`\`\`
${EXTRA_MESSAGE}
EOF
)
else
SLACK_TEXT_MESSAGE=$(cat <<EOF
*Deployment ($JOB_ID) of $PROJECT finished ${emoji}*
Conclusion: ${JOB_STATUS}
${EXTRA_MESSAGE}
EOF
)
fi
Expand Down

0 comments on commit 92100bf

Please sign in to comment.