Skip to content

Commit

Permalink
fix: allow more preset
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Dec 19, 2024
1 parent e823b3e commit 1f0deb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export default function getCLI(context) {

program.command('docker')
.description('Generates/run docker build commands use in CI')
.option('-t, --preset <preset>', 'Build preset', /^(lean|dev|dockerize|websocket|py310|ci|py311)$/i, 'lean')
.option('-t, --preset <preset>', 'Build preset', /^(lean|dev|dockerize|python-base|superset-node|superset-node-ci|websocket|py310|ci|py311)$/i, 'lean')
.option('-c, --context <context>', 'Build context', /^(push|pull_request|release)$/i, 'local')
.option('-r, --context-ref <ref>', 'Reference to the PR, release, or branch')
.option('-p, --platform <platform...>', 'Platforms (multiple values allowed)')
Expand Down
3 changes: 1 addition & 2 deletions src/docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export function getDockerTags({
tags.add(makeDockerTag([`GHA-${process.env.GITHUB_RUN_ID}`]));
}


return [...tags];
}

Expand Down Expand Up @@ -120,7 +119,7 @@ export async function getDockerCommand({
}).map((tag) => `-t ${tag}`).join(' \\\n ');
const isAuthenticated = !!(process.env.DOCKERHUB_TOKEN);

let dockerArgs = "";
let dockerArgs = '';
dockerArgs += push || isAuthenticated ? ' --push ' : '';
dockerArgs += load ? ' --load ' : '';
const targetArgument = buildTarget ? `--target ${buildTarget}` : '';
Expand Down
2 changes: 1 addition & 1 deletion src/docker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jest.mock('./github.js', () => jest.fn().mockImplementation(() => NEW_REL));
beforeEach(() => {
process.env.TEST_ENV = 'true';
process.env.DOCKERHUB_TOKEN = 'dummy';
process.env.GITHUB_RUN_ID= '123';
process.env.GITHUB_RUN_ID = '123';
});

afterEach(() => {
Expand Down

0 comments on commit 1f0deb0

Please sign in to comment.