mirror of
https://github.com/docker/actions-toolkit.git
synced 2024-11-26 22:26:08 +08:00
context: fix pull request ref
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
18c8bddca3
commit
958f229292
@ -45,6 +45,8 @@ export class Context {
|
||||
}
|
||||
if (github.context.sha && !gitRef.startsWith(`refs/pull/`)) {
|
||||
gitRef = github.context.sha;
|
||||
} else if (gitRef.startsWith(`refs/pull/`)) {
|
||||
gitRef = gitRef.replace(/\/merge$/g, '/head');
|
||||
}
|
||||
return gitRef;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user