Skip to content

factory: burn mac based on factory serial #366

factory: burn mac based on factory serial

factory: burn mac based on factory serial #366

Workflow file for this run

name: CI
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
type: choice
options:
- off
- error
- warn
- info
- debug
- trace
bmcd_version:
description: 'BMC daemon version'
required: false
type: string
pull_request:
branches: ["master"]
push:
branches:
- '*'
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
env:
RUST_LOG: ${{ inputs.logLevel }}
steps:
- name: Maximize build space
uses: AdityaGarg8/[email protected]
with:
remove-android: 'true'
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: get version
run: echo "BUILD_VERSION=`git describe --tags`" >> $GITHUB_ENV
- name: conditional bmcd version injection
if: inputs.bmcd_version != ''
run: |
sed -ir 's#^BMCD_VERSION.*#BMCD_VERSION=${{ inputs.bmcd_version }}#g' ${{ github.workspace }}/tp2bmc/package/bmcd/bmcd.mk
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
context: .
tags: buildroot_local:latest
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
env:
DOCKER_BUILD_SUMMARY: false
- name: build firmware
uses: addnab/docker-run-action@v3
with:
image: buildroot_local:latest
options: -v ${{ github.workspace }}:/work
run: |
/work/setup_build.sh
cd /work/buildroot
make BR2_EXTERNAL=../tp2bmc tp2bmc_defconfig
make
- name: stamp images
run: |
mkdir artifacts
sudo mv buildroot/output/images/tp2-bmc-firmware-sdcard.img artifacts/tp2-firmware-sdcard-${{ env.BUILD_VERSION }}.img
sudo mv buildroot/output/images/rootfs.erofs artifacts/tp2-ota-${{ env.BUILD_VERSION }}.tpu
- name: archive artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: tp2-${{ env.BUILD_VERSION }}
path: artifacts/*