Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
HACK(rock5): add ci workflow to build imager
Browse files Browse the repository at this point in the history
  • Loading branch information
milas committed May 29, 2024
1 parent 6d393f5 commit aef9891
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/ci.yaml
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"

0 comments on commit aef9891

Please sign in to comment.