This repository has been archived by the owner on May 31, 2024. It is now read-only.
forked from siderolabs/talos
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HACK(rock5): add ci workflow to build imager
- Loading branch information
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
"on": | ||
push: | ||
branches: | ||
- main | ||
- release-* | ||
tags: | ||
- v* | ||
pull_request: | ||
branches: | ||
- main | ||
- release-* | ||
|
||
jobs: | ||
default: | ||
env: | ||
PLATFORM: linux/arm64 | ||
INSTALLER_ARCH: targetarch | ||
PKG_KERNEL: ghcr.io/milas/talos-rk3588-kernel:v0.2.0 | ||
USERNAME: ${{ github.repository_owner }} | ||
permissions: | ||
actions: read | ||
contents: write | ||
issues: read | ||
packages: write | ||
pull-requests: read | ||
runs-on: | ||
- self-hosted | ||
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/')) | ||
steps: | ||
- name: gather-system-info | ||
id: system-info | ||
uses: kenchan0130/actions-system-info@v1.3.0 | ||
continue-on-error: true | ||
- name: print-system-info | ||
run: | | ||
MEMORY_GB=$((${{ steps.system-info.outputs.totalmem }}/1024/1024/1024)) | ||
OUTPUTS=( | ||
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}" | ||
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}" | ||
"Hostname: ${{ steps.system-info.outputs.hostname }}" | ||
"NodeName: ${NODE_NAME}" | ||
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}" | ||
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}" | ||
"Name: ${{ steps.system-info.outputs.name }}" | ||
"Platform: ${{ steps.system-info.outputs.platform }}" | ||
"Release: ${{ steps.system-info.outputs.release }}" | ||
"Total memory: ${MEMORY_GB} GB" | ||
) | ||
for OUTPUT in "${OUTPUTS[@]}";do | ||
echo "${OUTPUT}" | ||
done | ||
continue-on-error: true | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- name: Unshallow | ||
run: | | ||
git fetch --prune --unshallow | ||
- name: Build | ||
run: | | ||
make imager | ||
- name: Login to registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
- name: Push to registry | ||
if: github.event_name != 'pull_request' | ||
run: | | ||
make imager PUSH=true | ||
- name: Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: crazy-max/ghaction-github-release@v2 | ||
with: | ||
draft: "true" |