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 c26d905 commit 9e11393
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 @@ -69,6 +69,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 @@ -56,6 +56,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 9e11393

Please sign in to comment.