Skip to content

Commit db776c4

Browse files
committed
GitHub workflows: Delete base image before pushing container images
This is a workaround for https://github.com/redhat-actions/push-to-registry confusing the the just built image with the base image; see redhat-actions/push-to-registry#66
1 parent 2356c2e commit db776c4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/container-auto-update.yml

+6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ jobs:
7373
run: |
7474
buildah unshare ./build.sh
7575
76+
# Workaround for https://github.com/redhat-actions/push-to-registry/issues/66
77+
- name: Delete base image
78+
if: ${{ env.BUILD_ACTION != '' }}
79+
run: |
80+
podman rmi "$(. ./container.env ; echo "$BASE_IMAGE")"
81+
7682
- name: Container image metadata
7783
run: |
7884
"$CI_TOOLS_PATH/containers/get-metadata.sh" "$REGISTRY/$OWNER" "$IMAGE:latest"

.github/workflows/container-publish.yml

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ jobs:
6060
run: |
6161
buildah unshare ./build.sh
6262
63+
# Workaround for https://github.com/redhat-actions/push-to-registry/issues/66
64+
- name: Delete base image
65+
run: |
66+
podman rmi "$(. ./container.env ; echo "$BASE_IMAGE")"
67+
6368
- name: Container image metadata
6469
run: |
6570
podman image inspect "localhost/$IMAGE:${TAGS%% *}"

0 commit comments

Comments
 (0)