Skip to content

Add missing 'skipped' option to needs #411

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

Merged
merged 3 commits into from
Oct 13, 2020

Conversation

Aebrathia
Copy link
Contributor

Why:

I found out that the needs.<job id>.result context in Github Actions has an undocumented option skipped when the job dependency is skipped.

What's being changed:

I added 'skipped' to the list of possible values.

Check off the following:

@welcome
Copy link

welcome bot commented Oct 11, 2020

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

@janiceilene
Copy link
Contributor

Thanks for opening a PR @Aebrathia! I'll get this triaged for review ✨

@janiceilene janiceilene added 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 ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team labels Oct 13, 2020
@lucascosti lucascosti self-assigned this Oct 13, 2020
Copy link
Contributor

@lucascosti lucascosti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Aebrathia Thanks a lot for this PR!

It took me a little while to figure out if it was even possible for a job that needs a skipped job to actually run in order to see the context. but I did eventually get a workflow run that resulted in the output (using if: ${{ always() }} 😁) :

https://github.com/lucascosti/actions-public-playground/runs/1246235670?check_suite_focus=true#step:3:13

I'll get this PR merged in 🚀

@lucascosti lucascosti merged commit b5081ec into github:main Oct 13, 2020
@Aebrathia
Copy link
Contributor Author

@lucascosti thanks for your review, glad to know about Oxford commas.

The issue you faced is a bit tricky and needs a bit doc digging. Default if: value is ${{ success() && your_custom_if_condition }} unless you explicitely use a job status check function (like I did below).

name: Deploy
jobs:
  update:
    if: # should update deployment configuration
    steps:
      - run: # update project
  deploy:
    needs: update
    if: ${{ success() || needs.update.result == 'skipped' }} # Deploy even if no update (manual redeploy…)
    steps:
      - run: # deploy

@janiceilene
Copy link
Contributor

@Aebrathia If you haven't already, you can add yourself to the list of contributors by creating a new comment in this PR using these instructions. Thanks again! ✨

@lucascosti
Copy link
Contributor

The issue you faced is a bit tricky and needs a bit doc digging. Default if: value is ${{ success() && your_custom_if_condition }} unless you explicitely use a job status check function (like I did below).

Ah, of course! Yes, I forgot about situation where needs can just serialize jobs, rather than only for strict dependencies. 😁

jnidzwetzki pushed a commit to jnidzwetzki/docs that referenced this pull request Oct 6, 2022
Resolve site-bug [Issue with the page: /timescaledb/latest/quick-start/python/](timescale/docs#410)
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 ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants