Add gvisor support #105
Workflow file for this run
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
name: Build & Publish container images to GHCR | |
on: | |
push: | |
branches: | |
- main | |
- 'feature/*' | |
tags: | |
- 'v*.*.*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
permissions: | |
contents: read | |
packages: write | |
runs-on: ubuntu-latest | |
env: | |
PLATFORMS: linux/arm64,linux/amd64 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
env: | |
DESCRIPTION: kode-operator is a Kubernetes operator that manages the lifecycle your development environments. | |
with: | |
images: ghcr.io/jacero-io/kode-operator | |
tags: | | |
type=semver,pattern=v{{version}},event=tag | |
type=semver,pattern=v{{major}}.{{minor}},event=tag | |
type=semver,pattern=v{{major}},event=tag | |
type=ref,event=pr | |
type=sha | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=raw,value=dev-latest | |
labels: | | |
[email protected] | |
org.opencontainers.image.description=${{ env.DESCRIPTION }} | |
annotations: | | |
[email protected] | |
org.opencontainers.image.description=${{ env.DESCRIPTION }} | |
- name: Log in to GitHub Container Registry | |
if: (github.event.workflow_run.event != 'pull_request' || github.event.workflow_run.head_repository.full_name == github.repository ) && github.actor != 'dependabot[bot]' | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
platforms: ${{ env.PLATFORMS }} | |
push: ${{ github.event.workflow_run.event != 'pull_request' || github.event.workflow_run.head_repository.full_name == github.repository }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
annotations: ${{ steps.meta.outputs.annotations }} |