heroku-docker-deploy
heroku-docker-deploy copied to clipboard
Github build succeeds when heroku release tasks fail
Hi,
Thanks for the tool! I found that if the build fails in heroku you cause the GitHub action to fail as well, which is great. However, if the release tasks fail in heroku the GitHub action does not fail, as I would have expected.
Is it possible to cause the github action to fail if a release task fails?
For example, see this build: https://github.com/Riverside-Healthcare/extract_management/runs/2679015731?check_suite_focus=true
You can see there was an error in my release task:

And if you check the heroku log you can see the deploy failed because the release failed:


I'd expect that if a release fails, the GitHub action would fail.
Thanks for checking this out!
Confirmed this is still an issue
Hi, @christopherpickering and @danthedaniel - First of all, I want to apologize for the late reply.
I have tested the following case with many different approaches and was not able to reproduce it. In my case, an error during the release phase always raised an exception.

Could you provide me with some steps to reproduce? This would help me a lot.
This action relies on status codes returned from the CLI - so as long as Heroku CLI returns, a non-error status code exception will not be raised.
Thanks! I ended up changing my workflow since then and don't have a running example anymore. Maybe @danthedaniel does.
But basically, If you have a "release_tasks.sh" file that is runnable (chmod -x? or something) with gibberish in it, and release: ./release-tasks.sh in your heroku.yml, the build should fail right?
It must be a valid file, runable, and findable by the release step, but with an incorrect command.
I still get this one, by having a command inside my ./release-tasks.sh fail. In heroku it is marked as a fail, so I guess heroku isn't giving you feedback that it failed? What do you think about prepping for ERROR on line starts in the heroku output?

Actually, I don't think heroku marked it as an error...
