ghaction-setup-containerd
ghaction-setup-containerd copied to clipboard
GitHub Action to set up containerd
About
GitHub Action to set up containerd.
- Usage
- Quick start
- Pull Docker image
- Build and push Docker image
- Customizing
- inputs
- Limitation
- Contributing
- License
Usage
Quick start
name: containerd
on:
push:
jobs:
containerd:
runs-on: ubuntu-latest
steps:
-
name: Set up containerd
uses: crazy-max/ghaction-setup-containerd@v3
Pull Docker image
name: containerd
on:
push:
jobs:
containerd:
runs-on: ubuntu-latest
steps:
-
name: Set up containerd
uses: crazy-max/ghaction-setup-containerd@v3
-
name: Pull Docker image
run: |
sudo ctr i pull --all-platforms --all-metadata docker.io/crazymax/diun:latest
Build and push Docker image
name: containerd
on:
push:
jobs:
containerd:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Set up containerd
uses: crazy-max/ghaction-setup-containerd@v3
-
name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
tags: docker.io/crazymax/diun:latest
outputs: type=oci,dest=/tmp/image.tar
-
name: Import image in containerd
run: |
sudo ctr i import --base-name docker.io/crazymax/diun --digests --all-platforms /tmp/image.tar
-
name: Push image with containerd
run: |
sudo ctr i push --user "${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }}" docker.io/crazymax/diun:latest
Customizing
inputs
The following inputs can be used as step.with keys
| Name | Type | Default | Description |
|---|---|---|---|
containerd-version |
String | latest |
containerd version (e.g., v1.4.1) |
config |
String | Containerd config file | |
config-inline |
String | Same as config but inline |
configandconfig-inlineare mutually exclusive.
Limitation
This action is only available for Linux virtual environments.
Contributing
Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by becoming a sponsor on GitHub or by making a PayPal donation to ensure this journey continues indefinitely!
Thanks again for your support, it is much appreciated! :pray:
License
MIT. See LICENSE for more details.