diff --git a/action.yml b/action.yml index cef1ec4..ed511e5 100644 --- a/action.yml +++ b/action.yml @@ -7,6 +7,9 @@ inputs: header: description: Header to be displayed next to the environment required: true + status: + description: Job Status (Can be provided using ${{ job.status }}) + required: true additional-content: descrption: Additional info to include in the message required: false @@ -28,13 +31,10 @@ runs: echo "Error! channel required, and must be 'ci' or 'deployments'!" exit 1 fi - echo "${{ job.status }}" - if [ ${{ job.status }} == "success" ]; then - echo "Caught success?" + if [ ${{ inputs.status }} == "success" ]; then echo DISCORD_MESSAGE_STATUS_ICON=":white_check_mark:" >> $GITHUB_ENV echo DISCORD_MESSAGE_STATUS_COLOR=3405175 >> $GITHUB_ENV - elif [ ${{ job.status }} == "failure" ]; then - echo "Caught failure?" + elif [ ${{ inputs.status }} == "failure" ]; then echo DISCORD_MESSAGE_STATUS_ICON=":x:" >> $GITHUB_ENV echo DISCORD_MESSAGE_STATUS_COLOR=16071219 >> $GITHUB_ENV else