-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to exclude an exit code in github actions workflow result status (failure)? #908
Comments
GitHub uses the exit code of the last executed command to set the action's check run status. To start with, there’s no need to run this workflow with two distinct runner jobs. One job (or even step) is quite enough for this. black --check . || black --fast .
…
git push Having that said, this is an issue tracker for filing bugs. You may want to learn more about shell scripts, GitHub Actions and visit GitHub Community if you have any questions left by then. Good luck! |
@im-mortal Thanks for the help. here is my new workflow. everything seems good, but the new problem is if a person create a Pull Request, this workflow will be failed because of the 'branch name'. for example patch-1 (the branch that created pull request from that) >> main (main branch in the main repository), will be fail, because the patch-1 branch does not exists in the main repository.
|
@signorrayan For Perhaps, you would be interested in ditching the first step altogether and enabling auto-merge instead. However, would like to highlight the fact that you're asking for help instead of actually reporting a bug or suggesting a meaningful change to the code or the docs of this repository. Please close this issue and refer to my previous message to learn about the appropriate place to ask ad hoc questions. |
I have a workflow which in one of its steps, if the commands finish with exit code 1 (failure), i want to run next command/job (fix the problem which caused previous command failure), but i don't want that exit code 1 affect on a workflow result status.
in this situation, if i have exit code 1, even if i fix the problem, the result status will be failure, but i want if the second command fixed the problem, the result status be succeed.
is it possible?
here is my workflow.yml:
if the job build with command
run: black --check .
have exit code 1, i want to run jobreformat
to fix the problem and push that in repository. the second job works fine, but final result label is failure!!The text was updated successfully, but these errors were encountered: