1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2024-11-14 09:56:16 +01:00

Make 'checkout pull request HEAD' example work for non-PRs

This commit is contained in:
Alfonso Acosta 2022-03-02 20:23:19 +01:00 committed by GitHub
parent 2d1c1198e7
commit f6b63ceb9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -184,7 +184,7 @@ When Git 2.18 or higher is not in your PATH, falls back to the REST API to downl
```yaml ```yaml
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha || github.ref }}
``` ```
## Checkout pull request on closed event ## Checkout pull request on closed event