Skip to content

Commit

Permalink
GitHub workflows: Delete base image before pushing container images
Browse files Browse the repository at this point in the history
This is a workaround for https://github.com/redhat-actions/push-to-registry confusing the just built image with the base image; see redhat-actions/push-to-registry#66
  • Loading branch information
PhrozenByte committed Jun 17, 2023
1 parent 3c42f32 commit af48f8b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/container-auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ jobs:
run: |
buildah unshare ./build.sh
# Workaround for https://github.com/redhat-actions/push-to-registry/issues/66
- name: Delete base image
if: ${{ env.BUILD_ACTION != '' }}
run: |
podman rmi "$(. ./container.env ; echo "$BASE_IMAGE")"
- name: Container image metadata
run: |
"$CI_TOOLS_PATH/containers/get-metadata.sh" "$REGISTRY/$OWNER" "$IMAGE:latest"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/container-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ jobs:
run: |
buildah unshare ./build.sh
# Workaround for https://github.com/redhat-actions/push-to-registry/issues/66
- name: Delete base image
run: |
podman rmi "$(. ./container.env ; echo "$BASE_IMAGE")"
- name: Container image metadata
run: |
podman image inspect "localhost/$IMAGE:${TAGS%% *}"
Expand Down

0 comments on commit af48f8b

Please sign in to comment.