feat: devcontainer development #413
Workflow file for this run
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: 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/remove-unwanted-software@v4.1 | |
with: | |
remove-android: "true" | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
fetch-tags: "true" | |
- 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/scripts/configure.sh | |
/work/scripts/build.sh --release ${{ env.BUILD_VERSION }} | |
- name: stamp images | |
run: | | |
mkdir artifacts | |
sudo mv dist/tp2-bmc-firmware-sdcard-${{ env.BUILD_VERSION }}.img artifacts/tp2-bmc-firmware-sdcard-${{ env.BUILD_VERSION }}.img | |
sudo mv dist/tp2-bmc-firmware-ota-${{ env.BUILD_VERSION }}.tpu artifacts/tp2-bmc-firmware-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/* |