github context is not accessible from step.uses
See original GitHub issueDescribe the bug
It is not possible to use github
context in jobs.<job_id>.steps[*].uses
.
To Reproduce
create workflow which uses github
context within uses
:
name: ci
on: [push, pull_request]
jobs:
my_job:
runs-on: ubuntu-latest
steps:
- name: this repo action
uses: ${{ github.repository }}@${{ github.sha }}
Expected behavior
github.repository
and github.sha
are substituted with correspoonding values.
Runner Version and Platform
public runner
What’s not working?
github
context variable substitution
Job Log Output
The workflow is not valid. .github/workflows/ci.yml (Line: 17, Col: 15): Unrecognized named-value: 'github'. Located at position 1 within expression: github.repository
Runner and Worker’s Diagnostic Logs
https://github.com/myci-actions/add-deb-repo/actions/runs/469160309
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:19 (5 by maintainers)
Top Results From Across the Web
Contexts - GitHub Docs
Contexts are a way to access information about workflow runs, variables, runner environments, jobs, and steps. Each context is an object that contains ......
Read more >Why is env context not available in Github action job level if ...
The documentation reads. You can access this context from any step in a job. This object contains the properties listed below. ~ env...
Read more >Context access might be invalid: strategy #113
Describe the bug Many invalid instances of Context access might be invalid throughout a workflow file. To Reproduce Steps to reproduce the ...
Read more >[BUG] Resource not accessible by integration - Using ...
ps: i cant use GITHUB_TOKEN or any PAT, because im using this in a monorepo context, so I get a lot of rate-limit....
Read more >GitHub Actions Security Best Practices [cheat sheet included]
Learn how to secure your GitHub Actions with these best practices! From controlling credentials to using specific action version tags, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We don’t support expression in those place, you need to checkout the repo to use local action.
We want the YAML file readable at some level, so we don’t open expressions for every part of the YAML file.
You can make a feature request at https://github.community/c/code-to-cloud/github-actions/41
The runner repo might not be a good place for this kind of question, it doesn’t understand YAML at all, the service parses the YAML and validates against a defined schema. 😄