mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-02-23 10:31:22 +01:00
Cleanup temporary storage with podman system reset -f
This commit is contained in:
parent
a6c2c0fd7f
commit
213d6c4f7f
3 changed files with 7 additions and 12 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
15
src/index.ts
15
src/index.ts
|
@ -348,17 +348,12 @@ async function isPodmanLocalImageLatest(): Promise<boolean> {
|
|||
|
||||
// remove the pulled image from the Podman image storage
|
||||
async function removeDockerImage(): Promise<void> {
|
||||
if (!isImageFromDocker) {
|
||||
return;
|
||||
}
|
||||
core.info(`Removing "${sourceImages[0]}" from the Podman image storage`);
|
||||
for (const imageWithTag of sourceImages) {
|
||||
await execute(
|
||||
await getPodmanPath(),
|
||||
[ ...dockerPodmanOpts, "rmi", getFullDockerImageName(imageWithTag) ],
|
||||
{ ignoreReturnCode: true, failOnStdErr: false, group: true }
|
||||
);
|
||||
}
|
||||
await execute(
|
||||
await getPodmanPath(),
|
||||
[ ...dockerPodmanOpts, "system", "reset", "-f" ],
|
||||
{ ignoreReturnCode: true, failOnStdErr: false, group: true }
|
||||
);
|
||||
}
|
||||
|
||||
async function createDockerPodmanImageStroage(): Promise<void> {
|
||||
|
|
Loading…
Add table
Reference in a new issue