mirror of
https://github.com/docker/actions-toolkit.git
synced 2024-11-27 06:46:07 +08:00
Merge pull request #457 from crazy-max/fix-github-ref-pr
context: fix pull request ref
This commit is contained in:
commit
38d1dce1ff
@ -45,6 +45,8 @@ export class Context {
|
|||||||
}
|
}
|
||||||
if (github.context.sha && !gitRef.startsWith(`refs/pull/`)) {
|
if (github.context.sha && !gitRef.startsWith(`refs/pull/`)) {
|
||||||
gitRef = github.context.sha;
|
gitRef = github.context.sha;
|
||||||
|
} else if (gitRef.startsWith(`refs/pull/`)) {
|
||||||
|
gitRef = gitRef.replace(/\/merge$/g, '/head');
|
||||||
}
|
}
|
||||||
return gitRef;
|
return gitRef;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user