diff --git a/.github/workflows/build-rootfs.yml b/.github/workflows/build-rootfs.yml new file mode 100644 index 000000000..3cc804137 --- /dev/null +++ b/.github/workflows/build-rootfs.yml @@ -0,0 +1,37 @@ +# YAML -*- mode: yaml; tab-width: 2; indent-tabs-mode: nil; coding: utf-8 -*- +--- +name: Build in rootfs for arch + +on: # yamllint disable-line rule:truthy + push: + tags: + - '*' +jobs: + build: + runs-on: ubuntu-24.04 + strategy: + matrix: + arch: + - amd64 + steps: + - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 + - id: describe + name: Describe HEAD + run: | + echo "describe=$(git describe --tags --always || echo 0)" | tee $GITHUB_OUTPUT + - name: Setup and build + run: | + ARCH=${{ matrix.arch }} ./scripts/build-rootfs.sh + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ github.event.repository.name }}-${{ steps.describe.outputs.describe }}-${{ matrix.arch }} + path: build/dist/ + - name: Upload Release Asset + id: upload-release-asset + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: build/dist/* diff --git a/scripts/build-rootfs.sh b/scripts/build-rootfs.sh new file mode 100755 index 000000000..c2ee20328 --- /dev/null +++ b/scripts/build-rootfs.sh @@ -0,0 +1,125 @@ +#! /usr/bin/env bash +# -*- mode: Bash; tab-width: 2; indent-tabs-mode: nil; coding: utf-8 -*- +# vim:shiftwidth=4:softtabstop=4:tabstop=4: +# SPDX-License-Identifier: LicenseRef-MSLA +# SPDX-FileCopyrightText: Silicon Laboratories Inc. https://www.silabs.com + +set -e +set -x + +cat<