Fixed load and push

This commit is contained in:
Christian Schoch
2025-12-27 01:06:20 +01:00
parent 36c056a8e0
commit e156f8c989

View File

@@ -122,19 +122,22 @@ jobs:
name: docker-image
path: /tmp
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install skopeo
run: |
sudo apt-get update
sudo apt-get install -y skopeo
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
run: echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Load and Push Image
- name: Push OCI image to registry
run: |
docker load --input /tmp/image.tar
docker tag $(docker images -q | head -n1) ${{ needs.prepare.outputs.DOCKER_REPOSITORY }}:${{ needs.prepare.outputs.DOCKER_TAG }}
docker tag $(docker images -q | head -n1) ${{ needs.prepare.outputs.DOCKER_REPOSITORY }}:${{ github.sha }}
docker push ${{ needs.prepare.outputs.DOCKER_REPOSITORY }}:${{ needs.prepare.outputs.DOCKER_TAG }}
docker push ${{ needs.prepare.outputs.DOCKER_REPOSITORY }}:${{ github.sha }}
skopeo copy \
oci-archive:/tmp/image.tar \
docker://${{ needs.prepare.outputs.DOCKER_REPOSITORY }}:${{ needs.prepare.outputs.DOCKER_TAG }}
skopeo copy \
oci-archive:/tmp/image.tar \
docker://${{ needs.prepare.outputs.DOCKER_REPOSITORY }}:${{ github.sha }}
- name: Inspect image
if: success()