mirror of
https://github.com/supabase/setup-cli.git
synced 2025-12-08 16:16:25 +00:00
fix: inverted conditional for semver check (#129)
* fix: inverted conditional for semver check * chore: add tests for default version * chore: parse default action input * chore: update binary files * chore: fix unit test
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as tc from '@actions/tool-cache'
|
||||
import gte from 'semver/functions/lt'
|
||||
import gte from 'semver/functions/gte'
|
||||
import {getDownloadUrl} from './utils'
|
||||
|
||||
export const CLI_CONFIG_REGISTRY = 'SUPABASE_INTERNAL_IMAGE_REGISTRY'
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
// Get version of tool to be installed
|
||||
@@ -20,7 +22,7 @@ async function run(): Promise<void> {
|
||||
|
||||
// Use GHCR mirror by default
|
||||
if (version.toLowerCase() === 'latest' || gte(version, '1.28.0')) {
|
||||
core.exportVariable('SUPABASE_INTERNAL_IMAGE_REGISTRY', 'ghcr.io')
|
||||
core.exportVariable(CLI_CONFIG_REGISTRY, 'ghcr.io')
|
||||
}
|
||||
} catch (error) {
|
||||
if (error instanceof Error) core.setFailed(error.message)
|
||||
|
||||
Reference in New Issue
Block a user