sudo podman run --rm \
...
-e PREV_REF="${{ inputs.prev-ref }}" \
...
${{ inputs.rechunk }} \
...
Will partially fail if the prev-ref is for a private image.
It will still rechunk the new image, but skopeo wont succed when trying to get the previous manifest:
https://github.com/hhd-dev/rechunk/blob/master/3_chunk.sh#L32
I propose syncing the auth.json file to podman in your action:
sudo podman run --rm \
-v "${HOME}/.config/containers/auth.json:/run/containers/0/auth.json:ro" \
...
-e PREV_REF="${{ inputs.prev-ref }}" \
...
${{ inputs.rechunk }} \
...
alternatively use skopeo --creds with env vars:
if [ -n "$REGISTRY_AUTH_USERNAME" ] && [ -n "$REGISTRY_AUTH_PASSWORD" ]; then
skopeo inspect \
--creds "${REGISTRY_AUTH_USERNAME}:${REGISTRY_AUTH_PASSWORD}" \
docker://${PREV_REF}
else
skopeo inspect docker://${PREV_REF}
fi
I can make a PR for this. Let me know what you think
sudo podman run --rm \ ... -e PREV_REF="${{ inputs.prev-ref }}" \ ... ${{ inputs.rechunk }} \ ...Will partially fail if the
prev-refis for a private image.It will still rechunk the new image, but
skopeowont succed when trying to get the previous manifest:https://github.com/hhd-dev/rechunk/blob/master/3_chunk.sh#L32
I propose syncing the
auth.jsonfile to podman in your action:sudo podman run --rm \ -v "${HOME}/.config/containers/auth.json:/run/containers/0/auth.json:ro" \ ... -e PREV_REF="${{ inputs.prev-ref }}" \ ... ${{ inputs.rechunk }} \ ...alternatively use
skopeo --credswith env vars:I can make a PR for this. Let me know what you think