build boards #10
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: build boards | |
on: | |
workflow_dispatch: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '6 2 * * 6' | |
env: | |
BUILDDIR: gh | |
jobs: | |
prepare: | |
runs-on: [self-hosted, linux, x64] | |
steps: | |
- name: Clean up | |
run: rm -fR $BUILDDIR | |
- uses: actions/checkout@v4 | |
fetch_images: | |
runs-on: [self-hosted, linux, x64] | |
needs: [prepare] | |
strategy: | |
matrix: | |
include: | |
- url: https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-07-04/2024-07-04-raspios-bookworm-armhf-lite.img.xz | |
name: 2024-07-04-raspios-bookworm-armhf-lite.img.xz | |
checksum: df9c192d66d35e1ce67acde33a5b5f2b81ff02d2b986ea52f1f6ea211d646a1b | |
steps: | |
- name: download_required | |
run: > | |
cd ${{ vars.GOLDEN_IMAGE_DIR }} && | |
if [ ! -f "${{ matrix.name }}" ]; then | |
echo "golden image ${{ matrix.name }} not found, downloading" | |
wget ${{ matrix.url }} -O ${{ matrix.name }} | |
elif ! $(echo "${{ matrix.checksum }} ${{ matrix.name }}" | sha256sum -c --quiet --status); then | |
echo "golden image ${{ matrix.name }} checksum mismatch, downloading" | |
wget ${{ matrix.url }} -O ${{ matrix.name }} | |
else | |
echo "golden image ${{ matrix.name }} found, no download needed" | |
fi | |
- name: integrity check | |
run: echo "${{ matrix.checksum }} ${{ matrix.name }}" | sha256sum -c --quiet --status |