bake: split definition into two files
Allows to either include tags or labels or both definitions. Keep bake-file output for backward compatibility. Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
17
src/main.ts
17
src/main.ts
@@ -81,11 +81,16 @@ actionsToolkit.run(
|
||||
setOutput('json', JSON.stringify(jsonOutput));
|
||||
});
|
||||
|
||||
// Bake file definition
|
||||
const bakeFile: string = meta.getBakeFile();
|
||||
await core.group(`Bake file definition`, async () => {
|
||||
core.info(fs.readFileSync(bakeFile, 'utf8'));
|
||||
setOutput('bake-file', bakeFile);
|
||||
});
|
||||
// Bake files
|
||||
for (const kind of ['tags', 'labels']) {
|
||||
const bakeFile: string = meta.getBakeFile(kind);
|
||||
await core.group(`Bake file definition (${kind})`, async () => {
|
||||
core.info(fs.readFileSync(bakeFile, 'utf8'));
|
||||
setOutput(`bake-file-${kind}`, bakeFile);
|
||||
});
|
||||
}
|
||||
|
||||
// Bake file with tags and labels
|
||||
setOutput(`bake-file`, meta.getBakeFileTagsLabels());
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user