mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
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 <ntaylormullen@google.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user