From 89c0444970ab73fac0087c5e6202f546342984b6 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Tue, 15 Feb 2022 08:31:04 -0800 Subject: [PATCH 1/2] Update action.yml --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 4472036..dda360e 100755 --- a/action.yml +++ b/action.yml @@ -3,8 +3,8 @@ description: "Compile SQL to type-safe Go" author: 'Kyle Conroy' inputs: sqlc-version: - description: 'The version of sqlc to install. Defaults to v1.9.0' - required: false + description: 'The sqlc version to download (if necessary) and use.' + required: true branding: icon: 'terminal' color: 'purple' From 4bf07053d6957c2f356458c9b91766e165844e34 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Tue, 15 Feb 2022 08:32:12 -0800 Subject: [PATCH 2/2] Update main.ts --- src/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index febe064..90bb645 100755 --- a/src/main.ts +++ b/src/main.ts @@ -3,7 +3,11 @@ import * as tc from '@actions/tool-cache' async function run(): Promise { try { - const version = core.getInput('sqlc-version') || '1.9.0' + const version = core.getInput('sqlc-version') + if (!version) { + core.setFailed(`sqlc-version not set`) + return + } const toolDir = tc.find('sqlc', version, 'x64') if (toolDir !== '') { core.addPath(toolDir)