shell in step/defaults cannot use job/matrix templates
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
shell parameter in steps context should allow ${{ job/steps. }} variables.
I can see no reason for disallowing such expressions there.
To Reproduce
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: no matter what
shell: echo ${{ job.status }}
https://github.com/jacekkow/github-actions-bugs/blob/master/.github/workflows/bug1.yml
Expected behavior
Step returns:
Success
Runner Version and Platform
GitHub Actions
What's not working?
The workflow fails:
The workflow is not valid. .github/workflows/bug1.yml (Line: 9, Col: 17): Unrecognized named-value: 'job'. Located at position 1 within expression: job.status
As far as I can tell this is due to non-empty-string being used instead of string-steps-context (or perhaps new non-empty-string-steps-context?) here:
https://github.com/actions/runner/blob/3d70ef2da1798bb22fde31ceef8b9ea8cc328adb/src/Sdk/DTPipelines/workflow-v1.0.json#L403
Similar change should also be made here:
https://github.com/actions/runner/blob/3d70ef2da1798bb22fde31ceef8b9ea8cc328adb/src/Sdk/DTPipelines/workflow-v1.0.json#L422
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.