ci: cleanup #163
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Talos Image | |
on: | |
push: | |
branches: [ 'release-*' ] | |
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-build: | |
runs-on: buildjet-4vcpu-ubuntu-2204-arm | |
permissions: | |
actions: read | |
contents: write | |
issues: read | |
packages: write | |
pull-requests: read | |
steps: | |
- 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: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: siderolabs/talos | |
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 imager image | |
run: make imager | |
env: | |
PUSH: '1' | |
TAG: ${{ env.PUBLISH_TAG }} | |
PKG_KERNEL: ghcr.io/nberlee/kernel:${{ env.KERNEL_TAG }} | |
USERNAME: ${{ github.actor }} | |
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" | |
- name: release-notes | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
mkdir -p _out | |
make release-notes | |
- 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:$RK3588_TAG --overlay-image ghcr.io/nberlee/sbc-turingrk1:$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 | |
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:$RK3588_TAG --overlay-image ghcr.io/nberlee/sbc-turingrk1:$SBC_TAG --overlay-name=turingrk1" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: image-turing-rk1 | |
path: _out/*.raw.xz | |
if-no-files-found: error | |
- name: Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: crazy-max/ghaction-github-release@v2 | |
with: | |
body_path: _out/RELEASE_NOTES.md | |
draft: "true" | |
files: | | |
_out/metal-turing_rk1-arm64.raw.xz |