Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a .img builder workflow /claim #1688 #1689

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
05206a2
Create rpi-img-builder.yaml
NL-TCH Oct 31, 2024
a6fe497
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
cbcd6e1
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
79b1981
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
7e1a758
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
6424456
addd install script
NL-TCH Oct 31, 2024
a1cb490
fix deprecated methods/versions
NL-TCH Oct 31, 2024
288438b
fix raspap install while building
NL-TCH Oct 31, 2024
fd3a7d1
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
4b8308d
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
a52f412
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
addf1ef
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
4570edc
test
NL-TCH Oct 31, 2024
cd504af
Create test.md
NL-TCH Oct 31, 2024
6a55551
Rename test.md to test.yml
NL-TCH Oct 31, 2024
4a6e24a
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
b6ba5b5
Update test.yml
NL-TCH Oct 31, 2024
328a8c0
Update test.yml
NL-TCH Oct 31, 2024
600c183
Update test.yml
NL-TCH Oct 31, 2024
227492c
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
351354c
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
f8ccc3d
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
f5f5058
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
9c864d1
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
1db076a
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
d856184
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
0a1c142
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
738d8f4
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
4627843
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
12df2a5
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
f4e0306
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
8a12791
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
f5bcd7f
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
000f068
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
691c669
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
6f62ba1
Update rpi-img-builder.yaml
NL-TCH Oct 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/rpi-img-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build arm images for RPI
on:
push:
branches:
- master
- BUILDER #remove after push to prod

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: prepareRASPAP
run: |
mkdir -p test-stage/package-test &&
{
cat > test-stage/package-test/00-run-chroot.sh <<-EOF
#!/bin/bash
apt-get install -y curl
curl -sL https://install.raspap.com | bash -s -- --yes --openvpn 1 --restapi 1 --adblock 1 --wireguard 1 --tcp-bbr 1
EOF
} &&
chmod +x test-stage/package-test/00-run-chroot.sh &&
echo "nodejs" > test-stage/package-test/01-packages &&
{
cat > test-stage/prerun.sh <<-EOF
#!/bin/bash -e
if [ ! -d "\${ROOTFS_DIR}" ]; then
copy_previous
fi
EOF
} &&
chmod +x test-stage/prerun.sh

- name: Build amd64 image
id: build
uses: usimd/pi-gen-action@v1
with:
compression: zip
compression-level: 6
disable-first-boot-user-rename: 0
docker-opts: ''
enable-noobs: false
enable-ssh: 1 #discuss with @billz
export-last-stage-only: true
extra-host-dependencies: ''
extra-host-modules: ''
hostname: raspap
image-name: 'raspap-latest'
keyboard-keymap: gb
keyboard-layout: English (UK)
locale: en_GB.UTF-8
password: 'raspap' #discuss with @billz
pi-gen-dir: pi-gen
pi-gen-release: Raspberry Pi reference
pi-gen-repository: RPi-Distro/pi-gen
pi-gen-version: arm64
pubkey-only-ssh: 0
pubkey-ssh-first-user: ''
release: bookworm
setfcap: ''
timezone: Europe/London
username: raspap
verbose-output: true #change after pushing to prod
stage-list: stage0 stage1 stage2 ./test-stage

- name: Set output
run: echo "image-path=${{ steps.build.outputs.image-path }}" >> $GITHUB_OUTPUT

- uses: actions/upload-artifact@v4
with:
name: pi-gen-image
path: ${{ steps.build.outputs.image-path }}
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: testtest
on:
push:
branches:
- master
- BUILDER #remove after push to prod

jobs:
pi-gen-nodejs:
runs-on: ubuntu-latest
steps:
# Create a stage 'test-stage' instructing to add Nodesource repo and install nodejs as dependency
- run: |
mkdir -p test-stage/package-test &&
{
cat > test-stage/package-test/00-run-chroot.sh <<-EOF
#!/bin/bash
apt-get install -y curl
curl -sL https://install.raspap.com | bash -s -- --yes --openvpn 1 --restapi 1 --adblock 1 --wireguard 1 --tcp-bbr 1
EOF
} &&
chmod +x test-stage/package-test/00-run-chroot.sh &&
echo "nodejs" > test-stage/package-test/01-packages &&
{
cat > test-stage/prerun.sh <<-EOF
#!/bin/bash -e
if [ ! -d "\${ROOTFS_DIR}" ]; then
copy_previous
fi
EOF
} &&
chmod +x test-stage/prerun.sh

- uses: usimd/pi-gen-action@v1
with:
image-name: test
stage-list: stage0 stage1 stage2 ./test-stage
verbose-output: true #change after pushing to prod
Loading