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
|
@ -348,17 +348,12 @@ async function isPodmanLocalImageLatest(): Promise<boolean> {
|
||||||
|
|
||||||
// remove the pulled image from the Podman image storage
|
// remove the pulled image from the Podman image storage
|
||||||
async function removeDockerImage(): Promise<void> {
|
async function removeDockerImage(): Promise<void> {
|
||||||
if (!isImageFromDocker) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
core.info(`Removing "${sourceImages[0]}" from the Podman image storage`);
|
core.info(`Removing "${sourceImages[0]}" from the Podman image storage`);
|
||||||
for (const imageWithTag of sourceImages) {
|
|
||||||
await execute(
|
await execute(
|
||||||
await getPodmanPath(),
|
await getPodmanPath(),
|
||||||
[ ...dockerPodmanOpts, "rmi", getFullDockerImageName(imageWithTag) ],
|
[ ...dockerPodmanOpts, "system", "reset", "-f" ],
|
||||||
{ ignoreReturnCode: true, failOnStdErr: false, group: true }
|
{ ignoreReturnCode: true, failOnStdErr: false, group: true }
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createDockerPodmanImageStroage(): Promise<void> {
|
async function createDockerPodmanImageStroage(): Promise<void> {
|
||||||
|
|
Loading…
Add table
Reference in a new issue