1
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2024-11-26 02:11:28 +00:00

builds updates dist

Signed-off-by: James Bradlee <james.bradlee@telenor.no>
This commit is contained in:
James Bradlee 2024-08-20 10:59:28 +02:00
parent a52fa92dc9
commit 1be0f9404c
No known key found for this signature in database

7
dist/index.js vendored
View file

@ -1717,6 +1717,7 @@ const path = __importStar(__nccwpck_require__(1017));
const workflowContextHelper = __importStar(__nccwpck_require__(9568)); const workflowContextHelper = __importStar(__nccwpck_require__(9568));
function getInputs() { function getInputs() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
var _a;
const result = {}; const result = {};
// GitHub workspace // GitHub workspace
let githubWorkspacePath = process.env['GITHUB_WORKSPACE']; let githubWorkspacePath = process.env['GITHUB_WORKSPACE'];
@ -1748,7 +1749,11 @@ function getInputs() {
const isWorkflowRepository = qualifiedRepository.toUpperCase() === const isWorkflowRepository = qualifiedRepository.toUpperCase() ===
`${github.context.repo.owner}/${github.context.repo.repo}`.toUpperCase(); `${github.context.repo.owner}/${github.context.repo.repo}`.toUpperCase();
// Source branch, source version // 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 = (_a = core.getInput('ref')) !== null && _a !== void 0 ? _a : result.commit;
if (!result.ref) { if (!result.ref) {
if (isWorkflowRepository) { if (isWorkflowRepository) {
result.ref = github.context.ref; result.ref = github.context.ref;