mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-24 12:25:34 +00:00
Merge 0865c4bfce
into 85e6279cec
This commit is contained in:
commit
92e3997eda
5 changed files with 47 additions and 2 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -1744,7 +1744,11 @@ function getInputs() {
|
|||
const isWorkflowRepository = qualifiedRepository.toUpperCase() ===
|
||||
`${github.context.repo.owner}/${github.context.repo.repo}`.toUpperCase();
|
||||
// Source branch, source version
|
||||
result.ref = core.getInput('ref');
|
||||
result.commit = core.getInput('commit');
|
||||
if (result.commit && !result.commit.match(/^[0-9a-fA-F]{40}$/)) {
|
||||
throw new Error(`The commit SHA '${result.commit}' is not a valid SHA.`);
|
||||
}
|
||||
result.ref = core.getInput('ref') || result.commit;
|
||||
if (!result.ref) {
|
||||
if (isWorkflowRepository) {
|
||||
result.ref = github.context.ref;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue