mirror of
https://code.forgejo.org/docker/build-push-action.git
synced 2025-08-17 17:20:53 +00:00
refactor: remove nofallback parameter
Remove the nofallback input parameter as it's no longer needed. The action now assumes that a builder is already configured and available. Changes: - Remove nofallback from action.yml inputs - Remove nofallback from Inputs interface and getInputs function - Update tests to remove nofallback references - Also remove setup-only and buildx-version from action.yml (already removed from code) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
fece9d42f3
commit
4c54035b2b
6 changed files with 5 additions and 21 deletions
12
action.yml
12
action.yml
|
@ -7,14 +7,6 @@ branding:
|
||||||
color: 'blue'
|
color: 'blue'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
nofallback:
|
|
||||||
description: "Fail the build if the remote builder is not available; defaults to false"
|
|
||||||
required: false
|
|
||||||
default: 'false'
|
|
||||||
setup-only:
|
|
||||||
description: "Only setup the Blacksmith builder without running a Docker build; defaults to false"
|
|
||||||
required: false
|
|
||||||
default: 'false'
|
|
||||||
add-hosts:
|
add-hosts:
|
||||||
description: "List of a customs host-to-IP mapping (e.g., docker:10.180.0.1)"
|
description: "List of a customs host-to-IP mapping (e.g., docker:10.180.0.1)"
|
||||||
required: false
|
required: false
|
||||||
|
@ -36,10 +28,6 @@ inputs:
|
||||||
builder:
|
builder:
|
||||||
description: "Builder instance"
|
description: "Builder instance"
|
||||||
required: false
|
required: false
|
||||||
buildx-version:
|
|
||||||
description: "Version of Buildx to install"
|
|
||||||
required: false
|
|
||||||
default: 'v0.23.0'
|
|
||||||
cache-from:
|
cache-from:
|
||||||
description: "List of external cache sources for buildx (e.g., user/app:cache, type=local,src=path/to/dir)"
|
description: "List of external cache sources for buildx (e.g., user/app:cache, type=local,src=path/to/dir)"
|
||||||
required: false
|
required: false
|
||||||
|
|
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -34,7 +34,6 @@ describe('reportBuildMetrics', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
mockInputs = {
|
mockInputs = {
|
||||||
nofallback: false,
|
|
||||||
setupOnly: false,
|
setupOnly: false,
|
||||||
platforms: []
|
platforms: []
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,7 +57,6 @@ export interface Inputs {
|
||||||
target: string;
|
target: string;
|
||||||
ulimit: string[];
|
ulimit: string[];
|
||||||
'github-token': string;
|
'github-token': string;
|
||||||
nofallback: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getInputs(): Promise<Inputs> {
|
export async function getInputs(): Promise<Inputs> {
|
||||||
|
@ -94,8 +93,7 @@ export async function getInputs(): Promise<Inputs> {
|
||||||
tags: Util.getInputList('tags'),
|
tags: Util.getInputList('tags'),
|
||||||
target: core.getInput('target'),
|
target: core.getInput('target'),
|
||||||
ulimit: Util.getInputList('ulimit', {ignoreComma: true}),
|
ulimit: Util.getInputList('ulimit', {ignoreComma: true}),
|
||||||
'github-token': core.getInput('github-token'),
|
'github-token': core.getInput('github-token')
|
||||||
nofallback: core.getBooleanInput('nofallback')
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import {Metric_MetricType} from '@buf/blacksmith_vm-agent.bufbuild_es/stickydisk
|
||||||
|
|
||||||
async function assertBuildxAvailable(toolkit: Toolkit): Promise<void> {
|
async function assertBuildxAvailable(toolkit: Toolkit): Promise<void> {
|
||||||
if (!(await toolkit.buildx.isAvailable())) {
|
if (!(await toolkit.buildx.isAvailable())) {
|
||||||
core.setFailed(`Docker buildx is required. Please use setup-docker-builder action or setup-buildx-action to configure buildx.`);
|
core.setFailed(`Docker buildx is required. Please use setup-docker-builder action to configure buildx.`);
|
||||||
throw new Error('Docker buildx is not available');
|
throw new Error('Docker buildx is not available');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,6 @@ actionsToolkit.run(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const args: string[] = await context.getArgs(inputs, toolkit);
|
const args: string[] = await context.getArgs(inputs, toolkit);
|
||||||
args.push('--debug');
|
args.push('--debug');
|
||||||
core.debug(`context.getArgs: ${JSON.stringify(args)}`);
|
core.debug(`context.getArgs: ${JSON.stringify(args)}`);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue