🤖 Fix master builds of arm64 artifacts (#3174)

* Fix master builds of arm64 artifacts

Bump kairos-init to fix the nvidia build
On artifact push, use the same as the normal docker build but with push
Use the proper Dockerfile
Pass the correct build args for the Kubernetes version
Use the main dir as context

---------

Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
Itxaka 2025-02-07 16:14:55 +01:00 committed by GitHub
parent f7d067eaea
commit 6a348ca9aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 13 deletions

View File

@ -97,7 +97,7 @@ jobs:
- name: Build the docker image - name: Build the docker image
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: images/ context: .
file: images/Dockerfile file: images/Dockerfile
platforms: linux/arm64 platforms: linux/arm64
load: true load: true
@ -106,10 +106,7 @@ jobs:
VARIANT=${{ inputs.variant }} VARIANT=${{ inputs.variant }}
MODEL=${{ inputs.model }} MODEL=${{ inputs.model }}
BASE_IMAGE=${{ inputs.base_image }} BASE_IMAGE=${{ inputs.base_image }}
SOFTWARE_VERSION: ${{ inputs.k3s_version && 'v' || '' }}${{ inputs.k3s_version }} KUBERNETES_VERSION=${{ inputs.k3s_version && 'v' || '' }}${{ inputs.k3s_version }}
SOFTWARE_VERSION_PREFIX=k3s
# renovate: datasource=docker depName=quay.io/kairos/framework versioning=semver
FRAMEWORK_VERSION=v2.15.12
- name: Grype table - name: Grype table
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) }} if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) }}
uses: anchore/scan-action@v6.0.0 uses: anchore/scan-action@v6.0.0
@ -142,8 +139,8 @@ jobs:
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) }} if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) }}
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: images/ context: .
file: images/Dockerfile.kairos-${{ inputs.family }} file: images/Dockerfile
platforms: linux/arm64 platforms: linux/arm64
push: "true" push: "true"
tags: ${{ env.IMAGE_REF }} tags: ${{ env.IMAGE_REF }}
@ -151,11 +148,7 @@ jobs:
VARIANT=${{ inputs.variant }} VARIANT=${{ inputs.variant }}
MODEL=${{ inputs.model }} MODEL=${{ inputs.model }}
BASE_IMAGE=${{ inputs.base_image }} BASE_IMAGE=${{ inputs.base_image }}
RELEASE=${{ env.RELEASE }} KUBERNETES_VERSION=${{ inputs.k3s_version && 'v' || '' }}${{ inputs.k3s_version }}
SOFTWARE_VERSION: ${{ inputs.k3s_version && 'v' || '' }}${{ inputs.k3s_version }}
SOFTWARE_VERSION_PREFIX=k3s
# renovate: datasource=docker depName=quay.io/kairos/framework versioning=semver
FRAMEWORK_VERSION=v2.15.12
- name: Sign image - name: Sign image
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) }} if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')) }}
env: env:

View File

@ -1,6 +1,6 @@
ARG BASE_IMAGE=ubuntu:20.04 ARG BASE_IMAGE=ubuntu:20.04
FROM quay.io/kairos/kairos-init:v0.2.0 AS kairos-init FROM quay.io/kairos/kairos-init:v0.2.3 AS kairos-init
FROM ${BASE_IMAGE} AS base FROM ${BASE_IMAGE} AS base
ARG VARIANT=core ARG VARIANT=core