Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARM image build #15

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/os_image_artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
gardenlinux_kvm_artifact_url: https://github.com/gardenlinux/gardenlinux/releases/download/1592.2/kvm-gardener_prod-amd64-1592.2-76203a30.tar.xz
gardenlinux_metal_artifact_url: https://github.com/gardenlinux/gardenlinux/releases/download/1592.2/metal-gardener_prod_pxe-amd64-1592.2-76203a30.tar.xz
# You can add more OS specific URLs here later.
amd64:
gardenlinux_kvm_artifact_url: https://github.com/gardenlinux/gardenlinux/releases/download/1592.2/kvm-gardener_prod-amd64-1592.2-76203a30.tar.xz
gardenlinux_metal_artifact_url: https://github.com/gardenlinux/gardenlinux/releases/download/1592.2/metal-gardener_prod_pxe-amd64-1592.2-76203a30.tar.xz
arm64:
gardenlinux_kvm_artifact_url: https://github.com/gardenlinux/gardenlinux/releases/download/1592.2/kvm-gardener_prod-arm64-1592.2-76203a30.tar.xz
gardenlinux_metal_artifact_url: https://github.com/gardenlinux/gardenlinux/releases/download/1592.2/metal-gardener_prod_pxe-arm64-1592.2-76203a30.tar.xz
14 changes: 9 additions & 5 deletions .github/workflows/publish-gardenlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ jobs:
publish:
runs-on: ubuntu-latest

strategy:
matrix:
arch: [ "arm64", "amd64" ]

steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -22,8 +26,8 @@ jobs:
- name: Read Config Files and Extract OS Version
id: read-config
run: |
GARDENLINUX_KVM_ARTIFACT_URL=$(yq e '.gardenlinux_kvm_artifact_url' .github/os_image_artifacts.yml)
GARDENLINUX_METAL_ARTIFACT_URL=$(yq e '.gardenlinux_metal_artifact_url' .github/os_image_artifacts.yml)
GARDENLINUX_KVM_ARTIFACT_URL=$(yq e ${{ matrix.arch }}.gardenlinux_kvm_artifact_url .github/os_image_artifacts.yml)
GARDENLINUX_METAL_ARTIFACT_URL=$(yq e ${{ matix.arch }}.gardenlinux_metal_artifact_url .github/os_image_artifacts.yml)
echo "GARDENLINUX_KVM_ARTIFACT_URL=$GARDENLINUX_KVM_ARTIFACT_URL" >> $GITHUB_ENV
echo "GARDENLINUX_METAL_ARTIFACT_URL=$GARDENLINUX_METAL_ARTIFACT_URL" >> $GITHUB_ENV
OS_VERSION=$(echo $GARDENLINUX_KVM_ARTIFACT_URL | cut -d '/' -f 8)
Expand All @@ -48,7 +52,7 @@ jobs:

- name: Create Config JSON
run: |
echo "{\"commandLine\": \"\", \"os-release\": \"$OS_VERSION\"}" > config.json
echo "{\"commandLine\": \"\", \"os-release\": \"$OS_VERSION\"}, \"arch\": \"${{ matrix.arch }}\"" > config.json

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
Expand All @@ -63,7 +67,7 @@ jobs:
METAL_SQUASHFS_FILE=root.squashfs
METAL_INITRD_FILE=initrd
METAL_VMLINUZ_FILE=vmlinuz
oras push ghcr.io/ironcore-dev/os-images/gardenlinux:$OS_VERSION \
oras push ghcr.io/ironcore-dev/os-images/gardenlinux-${{ matrix.arch }}:$OS_VERSION \
$KVM_RAW_FILE:application/vnd.ironcore.image.rootfs.v1alpha1.rootfs \
$METAL_SQUASHFS_FILE:application/vnd.ironcore.image.squashfs.v1alpha1.squashfs \
$METAL_INITRD_FILE:application/vnd.ironcore.image.initramfs.v1alpha1.initramfs \
Expand All @@ -72,4 +76,4 @@ jobs:

- name: Push Image with ORAS (Latest Tag)
run: |
oras tag ghcr.io/ironcore-dev/os-images/gardenlinux:$OS_VERSION latest
oras tag ghcr.io/ironcore-dev/os-images/gardenlinux-${{ matrix.arch }}:$OS_VERSION latest