Skip to content

Commit

Permalink
try older ctr versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyanesh Mishra authored and Gyanesh Mishra committed Dec 8, 2023
1 parent 0fd7f26 commit 6a037b3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/build-soci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ jobs:
with:
soci-release: 'v0.4.0'

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v2.10.0

- name: Set up containerd for ubuntu
uses: crazy-max/ghaction-setup-containerd@v3.0.0
uses: crazy-max/ghaction-setup-containerd@v2.2.0
with:
config-inline: |
version = 2
Expand Down Expand Up @@ -97,7 +94,7 @@ jobs:
file: ./Dockerfile # Path to your Dockerfile
push: false
tags: ${{ steps.meta.outputs.tags }}
outputs: type=oci,dest=${{ steps.vars.outputs.image_path }}-${{ steps.vars.outputs.tag_hash }}.tar
outputs: type=oci,compression=gzip,dest=${{ steps.vars.outputs.image_path }}-${{ steps.vars.outputs.tag_hash }}.tar.gz
cache-from: type=local,src=${{ steps.vars.outputs.cache_dir }}
cache-to: type=local,mode=max,image-manifest=true,oci-mediatypes=true,dest=${{ steps.vars.outputs.cache_dir }}

Expand All @@ -107,7 +104,7 @@ jobs:
image_path: ${{ steps.vars.outputs.image_path }}
run: |
echo "Importing $image_path-$tag_hash to Containerd"
sudo ctr i import --no-unpack --digests $image_path-$tag_hash.tar
sudo ctr i import --no-unpack --all-platforms --digests $image_path-$tag_hash.tar.gz
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
Expand Down Expand Up @@ -148,7 +145,7 @@ jobs:
docker image prune -a -f --filter "until=24h"
# Delete the on disk copy
rm -rf "$image_path-$tag_hash.tar"
rm -rf "$image_path-$tag_hash.tar.gz"
# Delete the SHA image(s) from containerd store
sudo ctr i rm $(sudo ctr i ls -q)
Expand Down

0 comments on commit 6a037b3

Please sign in to comment.