mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-20 10:26:44 +00:00
Add digest output
Fix platforms and allow inputs Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
44d05b9191
commit
38c1f188ca
8 changed files with 244 additions and 68 deletions
|
@ -1,5 +1,20 @@
|
|||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import * as context from './context';
|
||||
import * as exec from './exec';
|
||||
|
||||
export async function getImageIDFile(): Promise<string> {
|
||||
return path.join(context.tmpDir, 'iidfile');
|
||||
}
|
||||
|
||||
export async function getImageID(): Promise<string | undefined> {
|
||||
const iidFile = await getImageIDFile();
|
||||
if (!fs.existsSync(iidFile)) {
|
||||
return undefined;
|
||||
}
|
||||
return fs.readFileSync(iidFile, {encoding: 'utf-8'});
|
||||
}
|
||||
|
||||
export async function isAvailable(): Promise<Boolean> {
|
||||
return await exec.exec(`docker`, ['buildx'], true).then(res => {
|
||||
if (res.stderr != '' && !res.success) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue