-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Pull requests events by default check out the merge commit ref. Alternatively, the pull request head can be checkout using:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
However, in successive actions it is not possible to detect whether the action uses another ref. github.context.sha
still references the merge commit. See for example the discussion on: jwgmeligmeyling/pmd-github-action#2
It would be nice if actions/checkout@v2
somehow made the checkout ref available as output or exported variable.
Or am I overlooking an existing approach to obtain the checked out commit SHA?
n-peugnet, jwgmeligmeyling, Simran-B, unlikelyzero, cheempz and 19 more
Metadata
Metadata
Assignees
Labels
No labels