changed skopeo caching
This commit is contained in:
@@ -104,25 +104,31 @@ jobs:
|
||||
tags: ${{ steps.metadata.outputs.tags }}
|
||||
labels: ${{ steps.metadata.outputs.labels }}
|
||||
|
||||
- name: Push Image via Skopeo (Convert to OCI via Archive)
|
||||
- name: Push Image via Skopeo (Optimized Archive)
|
||||
if: github.event_name != 'pull_request'
|
||||
env:
|
||||
GENERATED_TAGS: ${{ steps.metadata.outputs.tags }}
|
||||
run: |
|
||||
for tag in $GENERATED_TAGS; do
|
||||
echo "Saving $tag to temporary tarball..."
|
||||
docker save "$tag" -o image.tar
|
||||
# Die mehrzeiligen Tags in ein Bash-Array umwandeln
|
||||
TAG_LIST=($GENERATED_TAGS)
|
||||
FIRST_TAG=${TAG_LIST[0]}
|
||||
|
||||
echo "Saving image ONCE via $FIRST_TAG to temporary tarball..."
|
||||
docker save "$FIRST_TAG" -o image.tar
|
||||
|
||||
# Jetzt loopen wir NUR den Upload-Schritt über dieselbe Datei
|
||||
for tag in "${TAG_LIST[@]}"; do
|
||||
echo "Pushing and converting $tag to clean OCI format..."
|
||||
skopeo copy \
|
||||
--format oci \
|
||||
--dest-creds "${{ github.repository_owner }}:${{ secrets.REGISTRY }}" \
|
||||
docker-archive:image.tar \
|
||||
docker://$tag
|
||||
|
||||
rm -f image.tar
|
||||
done
|
||||
|
||||
# Am Ende sauber aufräumen
|
||||
rm -f image.tar
|
||||
|
||||
- name: Install envsubst dependencies
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user