Closed MisterJimson closed 2 years ago
I am thinking about what type of solution will be suitable here. Maybe a timeout for publishing to GCR step? Do you have any suggestions?
Locally the docker build command exists with a non-zero exit code. So I would want the action to propagate that exit code out to the action.
As an example
if docker build .; then
echo worked
else
echo failed
fi
When I run that bash script, the docker build starts, fails, then I see "failed" as the output. We should be able to capture the exit code and fail the workflow step.
Are not we doing the same here: https://github.com/RafikFarhad/push-to-gcr-github-action/blob/master/entrypoint.sh#L57-L62
if docker build $BUILD_PARAMS $TARGET_ARG -t $TEMP_IMAGE_NAME $FILE_ARG $INPUT_CONTEXT; then
echo "Image built ..."
else
echo "Image building failed. Exiting ..."
exit 1
fi
Wow. Hmm. Maybe it's something with my specific setup. I'll spend some more time debugging and try to find what I can.
Thanks, @MisterJimson for using this action for sharing your valuable suggestion. Seems like it has been no longer an issue for you so closing this.
We introduced a bug that caused the docker file to fail to build. I would expect the Github workflow to exit with an error.
Instead the publish to GCR step just continues forever. This uses up build time and makes debugging the problem difficult.