build boards #22
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 | |
ARTIFACT_PATH: /home/mender/artifacts | |
MENDER_ARTIFACT_NAME: gha_autobuild | |
jobs: | |
prepare: | |
runs-on: [self-hosted, linux, x64] | |
steps: | |
- name: Clean up | |
run: rm -fR $BUILDDIR | |
- uses: actions/checkout@v4 | |
- name: make artifact directory | |
run: mkdir -p $ARTIFACT_PATH | |
fetch_images: | |
runs-on: [self-hosted, linux, x64] | |
needs: [prepare] | |
steps: | |
- name: download_required | |
env: | |
GOLDEN_IMAGE_DIR: ${{ vars.GOLDEN_IMAGE_DIR }} | |
run: ./ci/prepare_images.py | |
setup_work: | |
runs-on: [self-hosted, linux, x64] | |
needs: [fetch_images] | |
steps: | |
- name: make image directory | |
run: mkdir -p input/image | |
- name: copy images | |
env: | |
GOLDEN_IMAGE_DIR: ${{ vars.GOLDEN_IMAGE_DIR }} | |
run: cp -v ${{ vars.GOLDEN_IMAGE_DIR }}/* input/image | |
- name: create dummy configuration | |
run: > | |
./scripts/bootstrap-rootfs-overlay-hosted-server.sh \ | |
--output-dir ${PWD}/input/rootfs_overlay_demo \ | |
--tenant-token "THISDOESNOTWORKATALLDONTEVENTRY" | |
convert: | |
runs-on: [self-hosted, linux, x64] | |
needs: [setup_work] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- config: raspberrypi3_config | |
image: 2024-07-04-raspios-bookworm-armhf-lite.img | |
- config: raspberrypi4_config | |
image: 2024-07-04-raspios-bookworm-armhf-lite.img | |
steps: | |
- name: convert | |
run: > | |
./docker-mender-convert \ | |
--disk-image input/image/${{ matrix.image }} \ | |
--config configs/${{ matrix.config }} \ | |
--config configs/mender_convert_demo_config \ | |
--overlay input/rootfs_overlay_demo | |
- name: collect artifacts | |
run: cp -fvR output $ARTIFACT_PATH/${{ matrix.config }} |