Sjoelbak Test - main - 38f4b62afbededce14e4d9a7118006eda5b03677 #80
This file contains hidden or 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 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| Wifi_SSID: | |
| description: 'Wifi SSID' | |
| required: true | |
| type: string | |
| run-name: ${{ github.event.inputs.Wifi_SSID }} - ${{github.ref_name}} - ${{ github.sha }} | |
| jobs: | |
| build: | |
| name: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: src | |
| - name: Install QEMU stuff | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-user-static qemu-utils | |
| - name: Register QEMU handlers | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: linux/arm64 | |
| - name: Cache packer | |
| uses: actions/cache@v4 | |
| id: cache-valgrind | |
| with: | |
| path: ".packer_cache/" | |
| key: ${{ runner.os }}-${{ hashFiles('src/install/packer_test.json') }} | |
| - name: Build | |
| run: docker run --rm --privileged -v /dev:/dev -v ${PWD}:/build -e WIFI_SSID="${{ github.event.inputs.Wifi_SSID }}" mkaczanowski/packer-builder-arm build src/install/packer_test.json | |
| - name: Sparse image | |
| run: | | |
| qemu img convert -O raw -S 1 test.img test-sparse.img | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: image | |
| path: | | |
| test.img | |
| test-sparse.img | |