I want to set up a job that checks out the branch that was pushed. Is it possible to do something like this?
- uses: actions/checkout@${GITHUB_REF}
Reference: https://help.github.com/en/articles/virtual-environments-for-github-actions#environment-variables
try:
- uses: actions/checkout@master
with:
ref: ${{ github.ref }}
BTW, if you just do - uses: actions/checkout@master, it will checkout the GITHUB_SHA, the @master is for versioning this checkout action
Ah thanks! Should I open a PR to add something to the README for this use case?
sure.
Opened a PR: https://github.com/actions/checkout/pull/21
PR is already merged, so this issue could be closed!
Thanks, @zeke!
Most helpful comment
try: