What article on docs.github.com is affected?
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif
https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
https://docs.github.com/en/actions/reference/encrypted-secrets
What part(s) of the article would you like to see updated?
- Something in the
if set should mention that secrets. isn't available
- Something in the context set should mention that
secrets. isn't available in if
- Something in the three should explain how to work around this
Additional information
It is common for projects to include a secret for deploying things and an action that uses that secret.
When one forks that repository, the secret won't be present and the workflow will break.
This experience is incredibly painful.
With just a bit of extra code in a workflow, the ❌ 's go away. But, w/o documentation on how to do it, 99% of workflow authors won't.
Here's an example which fixed one (of a number of failing workflows):
jsoref/argo-cd@ae52e40
- name: deploy
if: ${{ github.event_name == 'push' && env.HAVE_PERSONAL_TOKEN == 'true' }}
uses: peaceiris/actions-gh-pages@v2.5.0
env:
HAVE_PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN != '' }}
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
What article on docs.github.com is affected?
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif
https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
https://docs.github.com/en/actions/reference/encrypted-secrets
What part(s) of the article would you like to see updated?
ifset should mention thatsecrets.isn't availablesecrets.isn't available inifAdditional information
It is common for projects to include a secret for deploying things and an action that uses that secret.
When one forks that repository, the secret won't be present and the workflow will break.
This experience is incredibly painful.
With just a bit of extra code in a workflow, the ❌ 's go away. But, w/o documentation on how to do it, 99% of workflow authors won't.
Here's an example which fixed one (of a number of failing workflows):
jsoref/argo-cd@ae52e40