Skip to content

ci: Let's try to make both kernels #45

ci: Let's try to make both kernels

ci: Let's try to make both kernels #45

Workflow file for this run

name: kernel
on:
push:
branches: ['main', 'release-*']
tags:
- "v*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- platform: amd64
runner: ubuntu-latest
pkg: kernel
- platform: arm64
runner: buildjet-8vcpu-ubuntu-2204-arm
pkg: kernel
- platform: arm64
runner: buildjet-16vcpu-ubuntu-2204-arm
pkg: rpi-kernel
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-config: .github/buildkitd.toml
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Harbor registry
uses: docker/login-action@v3
with:
registry: registry.skysolutions.fi
username: ${{ secrets.HARBOR_USER }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Build kernel image
run: make ${{ matrix.pkg }}
env:
PUSH: '1'
USERNAME: library
PLATFORM: linux/${{ matrix.platform }}
PROGRESS: plain
REGISTRY: registry.skysolutions.fi
CI_ARGS: "--cache-from=ghcr.io/${{ github.repository }}:cache-${{ matrix.platform }}-${{ matrix.pkg }} --cache-to=ghcr.io/${{ github.repository }}:cache-${{ matrix.platform }}-${{ matrix.pkg }} --tag=registry.skysolutions.fi/library/talos/${{ matrix.pkg }}:${{ matrix.platform }}"
merge:
runs-on: buildjet-4vcpu-ubuntu-2204
needs: build
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- 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: Login to Harbor registry
uses: docker/login-action@v3
with:
registry: registry.skysolutions.fi
username: ${{ secrets.HARBOR_USER }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Create and push multi-platform image
run: |
docker buildx create --use
docker buildx imagetools create \
--tag registry.skysolutions.fi/library/talos/kernel:latest \
registry.skysolutions.fi/library/talos/kernel:amd64 \
registry.skysolutions.fi/library/talos/kernel:arm64