diff options
| author | matt korwel <[email protected]> | 2025-07-03 22:57:01 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-04 03:57:01 +0000 |
| commit | d43ea268b01e80166ca9325bf174a9796105715f (patch) | |
| tree | b9af69c504a328074fcb4bff8165ede0460d05d7 /scripts/publish-sandbox.js | |
| parent | 32db5ba0e1b7628fa6714bea8532377641b1af18 (diff) | |
Releasing: Utilizing Github Actions and Tagging for release. (#2852)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: N. Taylor Mullen <[email protected]>
Diffstat (limited to 'scripts/publish-sandbox.js')
| -rw-r--r-- | scripts/publish-sandbox.js | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/scripts/publish-sandbox.js b/scripts/publish-sandbox.js index 916089be..079874ce 100644 --- a/scripts/publish-sandbox.js +++ b/scripts/publish-sandbox.js @@ -20,33 +20,25 @@ import { execSync } from 'child_process'; const { - SANDBOX_IMAGE_REGISTRY, - SANDBOX_IMAGE_NAME, - npm_package_version, + npm_package_config_sandboxImageUri, DOCKER_DRY_RUN, + GEMINI_SANDBOX_IMAGE_TAG, } = process.env; -if (!SANDBOX_IMAGE_REGISTRY) { +if (!npm_package_config_sandboxImageUri) { console.error( - 'Error: SANDBOX_IMAGE_REGISTRY environment variable is not set.', + 'Error: npm_package_config_sandboxImageUri environment variable is not set (should be run via npm).', ); process.exit(1); } -if (!SANDBOX_IMAGE_NAME) { - console.error('Error: SANDBOX_IMAGE_NAME environment variable is not set.'); - process.exit(1); -} +let imageUri = npm_package_config_sandboxImageUri; -if (!npm_package_version) { - console.error( - 'Error: npm_package_version environment variable is not set (should be run via npm).', - ); - process.exit(1); +if (GEMINI_SANDBOX_IMAGE_TAG) { + const [baseUri] = imageUri.split(':'); + imageUri = `${baseUri}:${GEMINI_SANDBOX_IMAGE_TAG}`; } -const imageUri = `${SANDBOX_IMAGE_REGISTRY}/${SANDBOX_IMAGE_NAME}:${npm_package_version}`; - if (DOCKER_DRY_RUN) { console.log(`DRY RUN: Would execute: docker push "${imageUri}"`); } else { |
