Skip to content

Update action.yml #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import * as tc from '@actions/tool-cache'

async function run(): Promise<void> {
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)
Expand Down