Skip to content

Commit

Permalink
ci: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nberlee committed May 5, 2024
1 parent 137fe24 commit 621e995
Showing 1 changed file with 35 additions and 11 deletions.
46 changes: 35 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ on:
tags:
- "v*"

env:
ORIGIN_TAG: v1.7.1
KERNEL_TAG: v1.7.1
SBC_TAG: v1.7.1
RK3588_TAG: v1.7.1

jobs:
talos-image:
talos-build:
runs-on: buildjet-4vcpu-ubuntu-2204-arm

permissions:
Expand All @@ -31,16 +37,27 @@ jobs:
uses: actions/checkout@v4
with:
repository: siderolabs/talos
ref: v1.7.1
ref: ${{ env.ORIGIN_TAG }}
# need history for `git describe` to work for Talos `Makefile`
fetch-depth: 0
fetch-tags: true

- name: Set Environment Variable
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo "PUBLISH_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
else
echo "PUBLISH_TAG=${GITHUB_SHA}" >> $GITHUB_ENV
fi
shell: bash

- name: Build and push Talos installer image
run: make installer
env:
PUSH: '1'
PKG_KERNEL: ghcr.io/nberlee/kernel:v1.7.1
TAG: ${{ env.PUBLISH_TAG }}
TAG_SUFFIX: "-nosbclayer"
PKG_KERNEL: ghcr.io/nberlee/kernel:${{ env.KERNEL_TAG }}
USERNAME: ${{ github.actor }}
PLATFORM: linux/arm64
PROGRESS: plain
Expand All @@ -50,9 +67,10 @@ jobs:
run: make imager
env:
PUSH: '1'
PKG_KERNEL: ghcr.io/nberlee/kernel:v1.7.1
TAG: ${{ env.PUBLISH_TAG }}
PKG_KERNEL: ghcr.io/nberlee/kernel:${{ env.KERNEL_TAG }}
USERNAME: ${{ github.actor }}
PLATFORM: linux/arm64
PLATFORM: linux/arm64,linux/amd64
INSTALLER_ARCH: arm64
PROGRESS: plain
CI_ARGS: "--cache-from=ghcr.io/${{ github.actor }}/imager:cache --cache-to=ghcr.io/${{ github.actor }}/imager:cache"
Expand All @@ -61,27 +79,33 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
run: |
mkdir -p _out
# Hack for ARM64 release tool
mv hack/release.sh hack/release.sh.old
curl -sL "https://raw.githubusercontent.com/nberlee/talos/release-1.7-turingrk1/hack/release.sh" -o hack/release.sh
chmod +x hack/release.sh
export TAG=${GITHUB_REF#refs/tags/}
make release-notes
mv hack/release.sh.old hack/release.sh
- name: Build an turing-rk1 flashable image
run: make image-metal
env:
USERNAME: ${{ github.actor }}
PLATFORM: linux/arm64
PROGRESS: plain
IMAGER_ARGS: "--system-extension-image ghcr.io/nberlee/rk3588:v1.7.1 --overlay-image ghcr.io/nberlee/sbc-turingrk1:v1.7.1 --overlay-name=turingrk1"
IMAGER_ARGS: "--base-installer-image ghcr.io/nberlee/installer:${{ env.PUBLISH_TAG }}-nosbclayer --system-extension-image ghcr.io/nberlee/rk3588:${{ env.RK3588_TAG }} --overlay-image ghcr.io/nberlee/sbc-turingrk1:${{ env.SBC_TAG }} --overlay-name=turingrk1"

- name: Build an turing-rk1 installer
run: |
make image-installer
curl -sL "https://github.com/google/go-containerregistry/releases/download/v0.19.1/go-containerregistry_Linux_arm64.tar.gz" | tar -zxv -C /usr/local/bin/ crane
IMAGETAG=$(git describe --tag --always --dirty --match v[0-9]\*)
crane push _out/installer-arm64.tar ghcr.io/nberlee/installer:$IMAGETAG-rk3588
crane push _out/installer-arm64.tar ghcr.io/nberlee/installer:${{ env.PUBLISH_TAG }}-rk3588
env:
USERNAME: ${{ github.actor }}
PLATFORM: linux/arm64
PROGRESS: plain
IMAGER_ARGS: "--system-extension-image ghcr.io/nberlee/rk3588:v1.7.1 --overlay-image ghcr.io/nberlee/sbc-turingrk1:v1.7.1 --overlay-name=turingrk1"
IMAGER_ARGS: "--base-installer-image ghcr.io/nberlee/installer:${{ env.PUBLISH_TAG }}-nosbclayer --system-extension-image ghcr.io/nberlee/rk3588:${{ env.RK3588_TAG }} --overlay-image ghcr.io/nberlee/sbc-turingrk1:${{ env.SBC_TAG }} --overlay-name=turingrk1"

- uses: actions/upload-artifact@v3
with:
Expand All @@ -96,4 +120,4 @@ jobs:
body_path: _out/RELEASE_NOTES.md
draft: "true"
files: |
_out/metal-turing_rk1-arm64.raw.xz
_out/metal-turing_rk1-arm64.raw.xz

0 comments on commit 621e995

Please sign in to comment.