.gitea/workflows/redhat_build.yml aktualisiert
This commit is contained in:
@@ -80,6 +80,14 @@ jobs:
|
|||||||
containers.bootc=1
|
containers.bootc=1
|
||||||
ostree.bootable=1
|
ostree.bootable=1
|
||||||
|
|
||||||
|
- name: Login to Gitea Container Registry
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
uses: docker/login-action@v4.6.0
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY_HOST }}
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.REGISTRY }}
|
||||||
|
|
||||||
- name: Build Image (Docker Buildx OCI-Export)
|
- name: Build Image (Docker Buildx OCI-Export)
|
||||||
uses: docker/build-push-action@v7.3.0
|
uses: docker/build-push-action@v7.3.0
|
||||||
id: build_image
|
id: build_image
|
||||||
@@ -92,8 +100,8 @@ jobs:
|
|||||||
labels: ${{ steps.metadata.outputs.labels }}
|
labels: ${{ steps.metadata.outputs.labels }}
|
||||||
cache-from: type=registry,ref=${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
|
cache-from: type=registry,ref=${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
|
||||||
cache-to: type=registry,ref=${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
|
cache-to: type=registry,ref=${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
|
||||||
# Exporter als OCI-Tarball anfordern
|
# Speichert den OCI-Tarball direkt im Workspace (relativer Pfad)
|
||||||
outputs: type=oci,dest=/tmp/image.tar
|
outputs: type=oci,dest=image.tar
|
||||||
|
|
||||||
- name: Push Image via Skopeo (zstd:chunked)
|
- name: Push Image via Skopeo (zstd:chunked)
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
@@ -102,11 +110,11 @@ jobs:
|
|||||||
for TAG in $TAGS; do
|
for TAG in $TAGS; do
|
||||||
echo "Pushe ${TAG} via Skopeo mit zstd:chunked..."
|
echo "Pushe ${TAG} via Skopeo mit zstd:chunked..."
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v /tmp/image.tar:/tmp/image.tar \
|
-v ${{ github.workspace }}/image.tar:/workspace/image.tar \
|
||||||
quay.io/skopeo/stable copy \
|
quay.io/skopeo/stable copy \
|
||||||
--dest-creds "${{ github.repository_owner }}:${{ secrets.REGISTRY }}" \
|
--dest-creds "${{ github.repository_owner }}:${{ secrets.REGISTRY }}" \
|
||||||
--dest-compress-format zstd:chunked \
|
--dest-compress-format zstd:chunked \
|
||||||
oci-archive:/tmp/image.tar \
|
oci-archive:/workspace/image.tar \
|
||||||
"docker://${TAG}"
|
"docker://${TAG}"
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -149,5 +157,5 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
echo "Räume temporäre Dateien und Buildx-Cache auf..."
|
echo "Räume temporäre Dateien und Buildx-Cache auf..."
|
||||||
rm -f /tmp/image.tar
|
rm -f ${{ github.workspace }}/image.tar
|
||||||
docker buildx prune -a -f || true
|
docker buildx prune -a -f || true
|
||||||
Reference in New Issue
Block a user