mirror of
https://git.flexiblyrigid.au/actions/bake-action.git
synced 2025-12-06 07:48:05 +08:00
parsing definition signature changed in actions-toolkit 0.20.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -56,7 +56,7 @@ jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<Bu
|
||||
};
|
||||
});
|
||||
|
||||
jest.spyOn(Bake.prototype, 'parseDefinitions').mockImplementation(async (): Promise<BakeDefinition> => {
|
||||
jest.spyOn(Bake.prototype, 'getDefinition').mockImplementation(async (): Promise<BakeDefinition> => {
|
||||
return JSON.parse(`{
|
||||
"group": {
|
||||
"default": {
|
||||
@@ -334,7 +334,23 @@ describe('getArgs', () => {
|
||||
return buildxVersion;
|
||||
});
|
||||
const inp = await context.getInputs();
|
||||
const res = await context.getArgs(inp, toolkit);
|
||||
const definition = await toolkit.bake.getDefinition(
|
||||
{
|
||||
files: inp.files,
|
||||
load: inp.load,
|
||||
noCache: inp.noCache,
|
||||
overrides: inp.set,
|
||||
provenance: inp.provenance,
|
||||
push: inp.push,
|
||||
sbom: inp.sbom,
|
||||
source: inp.source,
|
||||
targets: inp.targets
|
||||
},
|
||||
{
|
||||
cwd: inp.workdir
|
||||
}
|
||||
);
|
||||
const res = await context.getArgs(inp, definition, toolkit);
|
||||
expect(res).toEqual(expected);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user