Skip to content

Commit c7aa2dc

Browse files
authored
fix: enable ghcr on versions above 1.28.0 (#114)
1 parent 6439e03 commit c7aa2dc

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

dist/index.js

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as core from '@actions/core'
22
import * as tc from '@actions/tool-cache'
3+
import gte from 'semver/functions/lt'
34
import {getDownloadUrl} from './utils'
45

56
async function run(): Promise<void> {
@@ -18,7 +19,9 @@ async function run(): Promise<void> {
1819
core.addPath(pathToCLI)
1920

2021
// Use GHCR mirror by default
21-
core.exportVariable('SUPABASE_INTERNAL_IMAGE_REGISTRY', 'ghcr.io')
22+
if (version.toLowerCase() === 'latest' || gte(version, '1.28.0')) {
23+
core.exportVariable('SUPABASE_INTERNAL_IMAGE_REGISTRY', 'ghcr.io')
24+
}
2225
} catch (error) {
2326
if (error instanceof Error) core.setFailed(error.message)
2427
}

0 commit comments

Comments
 (0)