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 aworkaround 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
  • Loading branch information
PhrozenByte committed Jun 17, 2023
1 parent 2356c2e commit ed0b1a3
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 ed0b1a3

Please sign in to comment.