You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document how to skip a step if a secret isn't present #6861
I think you are right that we could additionally call this out in the "if" sections in Workflow syntax for GitHub Actions. For example, adding a sentence like
Not all contexts are available to if statements.
before
For more information, see "Context and expression syntax for GitHub Actions."
Additionally, I think you are right that users would find a workaround helpful given how many issues and discussions have been opened with this request. An example could be added to the end of the "Using encrypted secrets in a workflow" section in "Encrypted secrets", prefaced with a sentence describing the use case. Here is a simplified example:
on: push
jobs:
my-jobname:
runs-on: ubuntu-latest
env:
MY_SECRET: ${{ secrets.MY_SECRET }}
steps:
- if: ${{ env.MY_SECRET }}
run: echo "I have the secret!"
You or anyone else is welcome to open a PR to make these changes.
Activity
janiceilene commentedon May 28, 2021
Thanks for opening an issue @jsoref! I'll triage this for the team to take a look 👀
skedwards88 commentedon Jun 29, 2021
Thank you for opening this issue! I have modified your suggestion for how to change the docs:
We document that the
secretscontext is not available inifstatements in the "Context availability" section of "Context and expression syntax for GitHub Actions", so I recommend leaving this article as is.I think you are right that we could additionally call this out in the "if" sections in Workflow syntax for GitHub Actions. For example, adding a sentence like
before
Additionally, I think you are right that users would find a workaround helpful given how many issues and discussions have been opened with this request. An example could be added to the end of the "Using encrypted secrets in a workflow" section in "Encrypted secrets", prefaced with a sentence describing the use case. Here is a simplified example:
You or anyone else is welcome to open a PR to make these changes.
KingofAngma commentedon Jul 14, 2021
jsoref commentedon Oct 17, 2021
I might do it at some point, but I'm hoping someone will pick it up first...
Document how to use secrets with `if:` conditionals in GitHub Actions…
Improve GitHub Actions behavior for external PRs (#19)
Skip riff-raff-artifact so fork PRs do not crash on roleArn missing
Fix? github/docs#6861
github: skip osrd-ui-website workflow when missing secret
github: skip osrd-ui-website workflow when missing secret
fix(ci): revert job-level if conditionals - secrets not available
fix(ci): revert job-level if conditionals - secrets not available