Skip to content

[#13] Kuksa example application (#14) #4

[#13] Kuksa example application (#14)

[#13] Kuksa example application (#14) #4

name: kuksa
on:
workflow_dispatch:
push:
paths:
- ".github/workflows/docker-build-kuksa.yml"
- "kuksa/**"
branches:
- "main"
pull_request:
paths:
- ".github/workflows/docker-build-kuksa.yml"
- "kuksa/**"
branches:
- "main"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/kuksa
jobs:
build-kuksa:
name: "Build multi-arch image"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
context: ./kuksa
file: ./kuksa/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max