ci: debug why final image does not contain root partition #40
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 Pi-DJ OS | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
# TODO: configure a cache for the apt packages that are downloaded during the build. | |
# Copilot generated the following code, but I'm not sure yet if it'll work. | |
# - name: Cache apt packages | |
# uses: actions/cache@v2 | |
# with: | |
# path: /var/cache/apt | |
# key: ${{ runner.os }}-apt-${{ hashFiles('**/apt.txt') }} | |
# restore-keys: | | |
# ${{ runner.os }}-apt- | |
- uses: pguyot/arm-runner-action@v2 | |
id: build_image | |
with: | |
base_image: dietpi:rpi_armv8_bullseye | |
cpu: cortex-a53 | |
image_additional_mb: 840 # produces a total disk image size of about 1536 MiB | |
optimize_image: false # TODO: this is broken, see the comment below | |
commands: | | |
set +x | |
echo | |
echo ">--------------------------------------------------------------------------------------------------<" | |
echo "> Building Pi-DJ " | |
echo ">--------------------------------------------------------------------------------------------------<" | |
echo | |
./dietpi/build.sh | |
# TODO: for some reason, the resulting image only has one partition, namely the boot partition. | |
# TODO: There's no secondary ext4 partition... | |
# Seems to be because of an error during resizing the rootfs partition: https://github.com/pguyot/arm-runner-action/issues/87 | |
df | |
echo | |
echo ">--------------------------------------------------------------------------------------------------<" | |
echo "> Done! " | |
echo ">--------------------------------------------------------------------------------------------------<" | |
echo | |
- name: Compress the release image | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/arm-runner' | |
run: | | |
mv ${{ steps.build_image.outputs.image }} pi-dj-${{ github.ref_name }}.img | |
xz -0 -T 0 -v pi-dj-${{ github.ref_name }}.img | |
- name: Upload release image | |
uses: actions/upload-artifact@v2 | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/arm-runner' | |
with: | |
name: pi-dj-${{ github.ref_name }}.img.xz | |
path: pi-dj-${{ github.ref_name }}.img.xz | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
prerelease: true | |
# body: "" # TODO | |
files: | | |
# TODO: update files after building | |
Release.txt | |
LICENSE |