Skip to content
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

Docs on expressions with extra conditions not clear #18269

Closed
1 task done
alexbrazier opened this issue May 26, 2022 · 3 comments · Fixed by #18270
Closed
1 task done

Docs on expressions with extra conditions not clear #18269

alexbrazier opened this issue May 26, 2022 · 3 comments · Fixed by #18270
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team

Comments

@alexbrazier
Copy link
Contributor

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/actions/learn-github-actions/expressions#failure

What part(s) of the article would you like to see updated?

The docs mention how to use failure() to catch failing jobs and then goes on to say it's the same as job.status == 'failure' or github.action_status == 'failure', however from my testing this isn't true.

Using either of the above fail to run after a failing job, e.g.

steps:
  - name: Fail demo
     run: exit 1
  - name: The job has failed
    if: ${{ job.status == 'failure' }}

The docs suggest The job has failed is meant to run here, but from my testing it doesn't. Not sure if this is a bug with github actions or the docs are just wrong or if I'm just missing something.

I think these broken examples should be removed and a practical example showing how to catch a specific failing job rather than all jobs would be useful here.

Additional information

No response

@alexbrazier alexbrazier added the content This issue or pull request belongs to the Docs Content team label May 26, 2022
@welcome
Copy link

welcome bot commented May 26, 2022

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label May 26, 2022
@Aloii88

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@alexbrazier @janiceilene @Aloii88 and others