-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gyanesh Mishra
authored and
Gyanesh Mishra
committed
Dec 8, 2023
1 parent
b1b640b
commit a104464
Showing
1 changed file
with
11 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,18 +42,13 @@ jobs: | |
soci-release: 'v0.4.0' | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2.1.0 | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
with: | ||
cleanup: false # Keep buildkit cache around | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Set up containerd for ubuntu | ||
uses: crazy-max/[email protected] | ||
|
||
- name: Install skopeo | ||
run: sudo snap install skopeo --edge --devmode | ||
|
||
- name: Docker meta | ||
id: meta | ||
|
@@ -74,33 +69,31 @@ jobs: | |
run: | | ||
tag_hash=$(echo -n "$tags" | md5sum | awk '{print $1}') | ||
echo "tag_hash=$tag_hash" >> $GITHUB_OUTPUT | ||
echo "cache_dir=/var/lib/kubelet/images/cache" >> $GITHUB_OUTPUT | ||
echo "image_dir=/var/lib/kubelet/images" >> $GITHUB_OUTPUT | ||
echo "image_path=/var/lib/kubelet/images/lorax" >> $GITHUB_OUTPUT | ||
- name: Create and update image directory | ||
- name: Create and update image/cache directory | ||
env: | ||
image_dir: ${{ steps.vars.outputs.image_dir }} | ||
cache_dir: ${{ steps.vars.outputs.cache_dir }} | ||
run: | | ||
sudo mkdir -p $image_dir | ||
sudo chown ubuntu:ubuntu $image_dir | ||
- name: Build Docker Image Cache | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
file: ./Dockerfile # Path to your Dockerfile | ||
push: false | ||
tags: ${{ steps.meta.outputs.tags }} | ||
outputs: type=cacheonly | ||
sudo mkdir -p $cache_dir | ||
sudo chown ubuntu:ubuntu $cache_dir | ||
- name: Export Docker image as OCI | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile # Path to your Dockerfile | ||
push: false | ||
tags: ${{ steps.meta.outputs.tags }} | ||
outputs: type=oci,oci-mediatypes=true,dest=${{ steps.vars.outputs.image_path }}-${{ steps.vars.outputs.tag_hash }}.tar | ||
cache-from: type=local,dest=${{ steps.vars.outputs.cache_dir }} | ||
cache-to: type=local,mode=max,image-manifest=true,src=${{ steps.vars.outputs.cache_dir }} | ||
|
||
- name: Import image in containerd | ||
env: | ||
|