mirror of
https://code.forgejo.org/docker/build-push-action.git
synced 2025-08-29 17:40:55 +00:00
add imageid output and use metadata to set digest output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
fe02965b48
commit
50fa0058d9
7 changed files with 153 additions and 87 deletions
|
@ -34,6 +34,17 @@ export async function getMetadata(): Promise<string | undefined> {
|
|||
return content;
|
||||
}
|
||||
|
||||
export async function getDigest(metadata: string | undefined): Promise<string | undefined> {
|
||||
if (metadata === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
const metadataJSON = JSON.parse(metadata);
|
||||
if (metadataJSON['containerimage.digest']) {
|
||||
return metadataJSON['containerimage.digest'];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export async function getSecretString(kvp: string): Promise<string> {
|
||||
return getSecret(kvp, false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue