slack-action
slack-action copied to clipboard
Step won't run if previous step failed
This is not related to how this action works, it's more related to how GH Actions work, in general.
I was testing sending a message after running unit tests and was surprised that I never got a slack notification for it, when looking at the debug output I saw this
##[debug]Evaluating: secrets.SLACK_BOT_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'SLACK_BOT_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating condition for step: 'Notify slack'
##[debug]Parsing expression: <success()>
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> false
##[debug]Result: false
Meaning the step didn't run, because the previous one had failed. I worked around this issue by adding if: always()
at the top of the step and it worked just fine.
This got me wondering, should this be stated in the README?
@leopic Feel free to submit a PR with the README change!
Will do, thanks!
On Wed, Mar 25, 2020 at 3:24 PM Abi Noda [email protected] wrote:
@leopic https://github.com/leopic Feel free to submit a PR with the README change!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/abinoda/slack-action/issues/15#issuecomment-604095407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4TQA4UYQM4RQZHUGC7TDRJJY7TANCNFSM4K5AI4YQ .
-- Leo Picado, Software Engineer. leopicado.com