diff --git a/action.yaml b/action.yaml index de85be4..78d8ae1 100644 --- a/action.yaml +++ b/action.yaml @@ -15,6 +15,7 @@ inputs: ref: description: "The reference can be a branch, tag, or a commit SHA" required: false + default: ${{ github.head_ref || github.ref }} repo: description: "Repo owner & name, slash separated, only set if invoking a workflow in a different repo" required: false diff --git a/src/main.ts b/src/main.ts index c78c4df..67c7693 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,7 +26,7 @@ async function run(): Promise { // Optional inputs, with defaults const token = core.getInput('token') - const ref = core.getInput('ref') || github.context.ref + const ref = core.getInput('ref') const [owner, repo] = core.getInput('repo') ? core.getInput('repo').split('/') : [github.context.repo.owner, github.context.repo.repo]