Skip to content

🎉

🎉 #1

Workflow file for this run

name: ci
on:
push:
jobs:
modify-rpi-image:
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v4
-
name: Add pygame to Raspberry Pi OS Bookworm
uses: dtcooper/rpi-image-modifier@v1
id: create-image
env:
TEST: 'hi mom!'
with:
base-image-url: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-11-19/2024-11-19-raspios-bookworm-arm64-lite.img.xz
image-path: 2024-11-19-raspios-bookworm-arm64-lite-modified-with-pygame.img
compress-with-xz: true
cache: true
mount-repository: true
env-vars: TEST
run: |
# Copy project README to root directory
cp -v /mounted-github-repo/README.md /home/pi/README.md
chown -v pi:pi /home/pi/README.md
# Install pygame
apt-get update
apt-get install -y --no-install-recommends python3-pygame
# Should print 'hi mom!'
echo "$TEST"
-
name: Print outputs
shell: bash
run: |
echo 'image-path: ${{ steps.create-image.outputs.image-path }}'
echo 'image-size: ${{ steps.create-image.outputs.image-size }}'
echo 'image-sha256sum: ${{ steps.create-image.outputs.image-sha256sum }}'
-
name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: built-image
path: ${{ steps.create-image.outputs.image-path }}
if-no-files-found: error
retention-days: 2
compression-level: 0 # Already compressed with xz above