Skip to content

Commit

Permalink
ci: debug why final image does not contain root partition
Browse files Browse the repository at this point in the history
  • Loading branch information
bvobart committed May 4, 2024
1 parent 833a758 commit 7c9740b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,23 @@ jobs:
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: 500
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
Expand All @@ -30,6 +41,12 @@ jobs:
./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! "
Expand Down
4 changes: 2 additions & 2 deletions dietpi/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ set_dietpi_config AUTO_SETUP_GLOBAL_PASSWORD pidj
set_dietpi_config CONFIG_CHECK_DIETPI_UPDATES 1 # Enable daily check for DietPi updates. 0=disable | 1=enable
set_dietpi_config CONFIG_CHECK_APT_UPDATES 1 # Enable daily check for APT package updates: 0=disable | 1=check only | 2=check and upgrade automatically
set_dietpi_config CONFIG_CHECK_CONNECTION_IP "127.0.0.1" # Workaround for installing DietPi software on GitHub Actions runners because Ping doesn't work there. Will be reset after build. https://github.com/pguyot/arm-runner-action/issues/91#issuecomment-2088435969
set_dietpi_config CONFIG_NTP_MODE 2 # Network time sync: 0=disabled | 1=boot only | 2=boot + daily | 3=boot + hourly | 4=Daemon + Drift
set_dietpi_config CONFIG_NTP_MODE 0 # Network time sync, disabled during build. Values: 0=disabled | 1=boot only | 2=boot + daily | 3=boot + hourly | 4=Daemon + Drift
set_dietpi_config SOFTWARE_DISABLE_SSH_PASSWORD_LOGINS root # Disable SSH password logins, e.g. when using pubkey authentication
# 0=Allow password logins for all users, including root
# root=Disable password login for root user only
Expand Down Expand Up @@ -103,5 +103,5 @@ log "Configuring desktop environment ..."

log "Finishing up ..."
set_dietpi_config CONFIG_CHECK_CONNECTION_IP "9.9.9.9" # Reset the workaround for installing DietPi software on GitHub Actions runners.

set_dietpi_config CONFIG_NTP_MODE 3 # Network time sync: 0=disabled | 1=boot only | 2=boot + daily | 3=boot + hourly | 4=Daemon + Drift
log "Done!"

0 comments on commit 7c9740b

Please sign in to comment.