mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-20 17:00:15 +03:00
Compare commits
4 commits
a193acbf5e
...
5e544b204a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5e544b204a | ||
![]() |
85e6279cec | ||
![]() |
009b9ae9e4 | ||
![]() |
1d3fa26c9e |
3 changed files with 13 additions and 2 deletions
|
@ -311,8 +311,17 @@ jobs:
|
|||
git commit -m "generated"
|
||||
git push
|
||||
```
|
||||
|
||||
*NOTE:* The user email is `{user.id}+{user.login}@users.noreply.github.com`. See users API: https://api.github.com/users/github-actions%5Bbot%5D
|
||||
|
||||
# Recommended permissions
|
||||
|
||||
When using the `checkout` action in your GitHub Actions workflow, it is recommended to set the following `GITHUB_TOKEN` permissions to ensure proper functionality, unless alternative auth is provided via the `token` or `ssh-key` inputs:
|
||||
|
||||
```yaml
|
||||
permissions:
|
||||
contents: read
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
|
|
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -2114,7 +2114,8 @@ function testRef(git, ref, commit) {
|
|||
// refs/tags/
|
||||
else if (upperRef.startsWith('REFS/TAGS/')) {
|
||||
const tagName = ref.substring('refs/tags/'.length);
|
||||
return ((yield git.tagExists(tagName)) && commit === (yield git.revParse(ref)));
|
||||
return ((yield git.tagExists(tagName)) &&
|
||||
commit === (yield git.revParse(`${ref}^{commit}`)));
|
||||
}
|
||||
// Unexpected
|
||||
else {
|
||||
|
|
|
@ -171,7 +171,8 @@ export async function testRef(
|
|||
else if (upperRef.startsWith('REFS/TAGS/')) {
|
||||
const tagName = ref.substring('refs/tags/'.length)
|
||||
return (
|
||||
(await git.tagExists(tagName)) && commit === (await git.revParse(ref))
|
||||
(await git.tagExists(tagName)) &&
|
||||
commit === (await git.revParse(`${ref}^{commit}`))
|
||||
)
|
||||
}
|
||||
// Unexpected
|
||||
|
|
Loading…
Reference in a new issue