Skip to content

lil more clear

lil more clear #22

Workflow file for this run

name: Build Firmware
on:
push:
branches:
- '**'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
container:
image: irvingywang/per-firmware:latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Fix git ownership
run: git config --global --add safe.directory /__w/firmware/firmware
- name: Get short hash
id: git_info
run: |
SHORT_HASH=$(git rev-parse --short HEAD)
echo "short_hash=$SHORT_HASH" >> $GITHUB_OUTPUT
BRANCH_NAME=${GITHUB_REF##*/}
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
- name: Run per_build.py
run: python3 per_build.py --release --package
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: firmware-${{ steps.git_info.outputs.branch }}-${{ steps.git_info.outputs.short_hash }}
path: |
output/**/*.elf
output/**/*.hex
output/**/*.tar.gz
common/daq/*.dbc
retention-days: ${{ github.ref == 'refs/heads/master' && 90 || 7 }}