mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-02-22 18:21:20 +01:00
Print image digest after every push
Signed-off-by: Tim Etchells <tetchell@redhat.com>
This commit is contained in:
parent
74b235b626
commit
e8a67de103
4 changed files with 12 additions and 10 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
0
git-hooks/pre-commit
Normal file → Executable file
0
git-hooks/pre-commit
Normal file → Executable file
|
@ -183,16 +183,18 @@ async function run(): Promise<void> {
|
||||||
core.info(`Successfully pushed ${imageWithTag} to ${registryPath}`);
|
core.info(`Successfully pushed ${imageWithTag} to ${registryPath}`);
|
||||||
|
|
||||||
registryPathList.push(registryPath);
|
registryPathList.push(registryPath);
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const digest = (await fs.promises.readFile(digestFile)).toString();
|
const digest = (await fs.promises.readFile(digestFile)).toString();
|
||||||
core.info(digest);
|
core.info(digest);
|
||||||
|
// the digest should be the same for every image, but we log it every time
|
||||||
|
// due to https://github.com/redhat-actions/push-to-registry/issues/26
|
||||||
core.setOutput(Outputs.DIGEST, digest);
|
core.setOutput(Outputs.DIGEST, digest);
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
core.warning(`Failed to read digest file "${digestFile}": ${err}`);
|
core.warning(`Failed to read digest file "${digestFile}": ${err}`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
core.setOutput(Outputs.REGISTRY_PATHS, JSON.stringify(registryPathList));
|
core.setOutput(Outputs.REGISTRY_PATHS, JSON.stringify(registryPathList));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue