Skip to content

Commit

Permalink
fix: testing with containerd
Browse files Browse the repository at this point in the history
  • Loading branch information
kainlite committed Sep 2, 2024
1 parent 073cb51 commit 6e4f55e
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,21 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Prepare
id: prep
run: |
DOCKER_IMAGE=kainlite/tr-gh
SHORTREF=${GITHUB_SHA::8}
TAG="${DOCKER_IMAGE}:${SHORTREF}"
echo tag=${TAG} >> ${GITHUB_OUTPUT}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up containerd
uses: crazy-max/ghaction-setup-containerd@v2

- name: Build and push
- name: Build Docker image
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ steps.prep.outputs.tag }}
context: .
platforms: linux/amd64,linux/arm64
tags: docker.io/kainlite/tr-gh:latest
outputs: type=oci,dest=/tmp/image.tar

- name: Import image in containerd
run: |
sudo ctr i import --base-name docker.io/kainlite/tr-gh --digests --all-platforms /tmp/image.tar
- name: Push image with containerd
run: |
sudo ctr --debug i push --user "${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" docker.io/kainlite/tr-gh:latest

0 comments on commit 6e4f55e

Please sign in to comment.