1
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2024-12-23 12:36:00 +01:00

in input-helper, make ref fallback to commit if the commit was provided but not ref

Signed-off-by: James Bradlee <james.bradlee@telenor.no>
This commit is contained in:
James Bradlee 2024-08-20 10:46:49 +02:00
parent 67b5caa109
commit 8a241b5b4d
No known key found for this signature in database

View file

@ -58,7 +58,7 @@ export async function getInputs(): Promise<IGitSourceSettings> {
// Source branch, source version
result.commit = core.getInput('commit')
result.ref = core.getInput('ref')
result.ref = core.getInput('ref') ?? result.commit
if (!result.ref) {
if (isWorkflowRepository) {
result.ref = github.context.ref