mirror of
https://github.com/kairos-io/provider-kairos.git
synced 2025-09-14 06:10:03 +00:00
🤖 Release arm64 generic artifacts (#346)
Builds and releases oci artifacts and ISOs for release pipelines. Also reworks a bit the master pipeline for arm generic to push to the master tag instead of latest. Also generates sboms as part of both pipelines Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
14
.github/workflows/image-arm.yaml
vendored
14
.github/workflows/image-arm.yaml
vendored
@@ -85,7 +85,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
flavor:
|
flavor:
|
||||||
- "opensuse-leap"
|
- "opensuse-leap-arm-generic"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||||
@@ -110,17 +110,15 @@ jobs:
|
|||||||
- name: Build 🔧
|
- name: Build 🔧
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||||
env:
|
env:
|
||||||
IMAGE: "quay.io/kairos/kairos-${{ matrix.flavor }}-arm-generic"
|
IMAGE: "quay.io/kairos/kairos-${{ matrix.flavor }}"
|
||||||
BASE_IMAGE: "quay.io/kairos/core-${{ matrix.flavor }}-arm-generic"
|
TAG: "master"
|
||||||
TAG: "latest"
|
|
||||||
run: |
|
run: |
|
||||||
earthly --platform=linux/arm64 +docker --BASE_IMAGE="$BASE_IMAGE" --IMAGE="$IMAGE:$TAG" --FLAVOR=$FLAVOR
|
earthly -P +all-arm-generic --IMAGE="$IMAGE:$TAG" --FLAVOR=${{ matrix.flavor }} --CORE_VERSION=master
|
||||||
earthly --platform=linux/arm64 +iso --IMAGE="$IMAGE:$TAG" --FLAVOR=${{ matrix.flavor }}
|
|
||||||
- name: Push to quay
|
- name: Push to quay
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||||
env:
|
env:
|
||||||
IMAGE: "quay.io/kairos/kairos-${{ matrix.flavor }}-arm-generic"
|
IMAGE: "quay.io/kairos/kairos-${{ matrix.flavor }}"
|
||||||
TAG: "latest"
|
TAG: "master"
|
||||||
run: |
|
run: |
|
||||||
docker push "$IMAGE:$TAG"
|
docker push "$IMAGE:$TAG"
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
|
41
.github/workflows/release-arm.yaml
vendored
41
.github/workflows/release-arm.yaml
vendored
@@ -87,3 +87,44 @@ jobs:
|
|||||||
sudo -E docker load -i image.tar
|
sudo -E docker load -i image.tar
|
||||||
sudo -E docker push "$IMAGE"
|
sudo -E docker push "$IMAGE"
|
||||||
sudo rm -rf build/IMAGE build/VERSION
|
sudo rm -rf build/IMAGE build/VERSION
|
||||||
|
|
||||||
|
image_and_iso_arm64_generic:
|
||||||
|
needs:
|
||||||
|
- get-matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
flavor:
|
||||||
|
- "opensuse-leap-arm-generic"
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Install earthly
|
||||||
|
uses: Luet-lab/luet-install-action@v1
|
||||||
|
with:
|
||||||
|
repository: quay.io/kairos/packages
|
||||||
|
packages: utils/earthly
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@master
|
||||||
|
with:
|
||||||
|
platforms: all
|
||||||
|
- name: Login to Quay Registry
|
||||||
|
run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USERNAME }} --password-stdin quay.io
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@master
|
||||||
|
- name: Build 🔧
|
||||||
|
run: |
|
||||||
|
K3S_LATEST=$(curl -s https://update.k3s.io/v1-release/channels | jq -rc '[ .data[] | select(.type == "channel") | select(.name | test("testing") | not) | .latest ] | unique | .[-1]')
|
||||||
|
earthly -P +all-arm-generic --FLAVOR=${{ matrix.flavor }} --K3S_VERSION=$K3S_LATEST
|
||||||
|
sudo mv build release
|
||||||
|
- name: Push to quay
|
||||||
|
run: |
|
||||||
|
IMAGE=$(cat release/IMAGE)
|
||||||
|
docker push "$IMAGE"
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
release/*
|
@@ -37,6 +37,12 @@ RELEASEVERSION:
|
|||||||
SAVE ARTIFACT VERSION AS LOCAL build/VERSION
|
SAVE ARTIFACT VERSION AS LOCAL build/VERSION
|
||||||
SAVE ARTIFACT IMAGE AS LOCAL build/IMAGE
|
SAVE ARTIFACT IMAGE AS LOCAL build/IMAGE
|
||||||
|
|
||||||
|
all-arm-generic:
|
||||||
|
BUILD --platform=linux/arm64 +docker
|
||||||
|
BUILD --platform=linux/arm64 +image-sbom
|
||||||
|
BUILD --platform=linux/arm64 +iso
|
||||||
|
DO +RELEASEVERSION
|
||||||
|
|
||||||
all:
|
all:
|
||||||
BUILD +docker
|
BUILD +docker
|
||||||
BUILD +image-sbom
|
BUILD +image-sbom
|
||||||
|
Reference in New Issue
Block a user