Skip to content

Commit

Permalink
take workflow from jamtools/raspap-webgui
Browse files Browse the repository at this point in the history
  • Loading branch information
mickmister authored Feb 10, 2025
1 parent a805730 commit 1868adf
Showing 1 changed file with 29 additions and 34 deletions.
63 changes: 29 additions & 34 deletions .github/workflows/build_rpi.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: Build and publish RaspAP images
name: Dispatched Build and publish RaspAP images

permissions:
contents: write

on:
release:
types: [published]
workflow_dispatch:
pull_request:

jobs:
Expand All @@ -21,52 +24,44 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Add RaspAP Stage
run: |
mkdir -p stage-raspap/package-raspap &&
{
cat > stage-raspap/package-raspap/00-run-chroot.sh <<-EOF
#!/bin/bash
apt-get update -y && apt-get install -y curl dhcpcd5 iptables procps
curl -sL https://install.raspap.com | bash -s -- --yes --openvpn 1 --restapi 1 --adblock 1 --wireguard 1 --tcp-bbr 1 --check 0
# - name: Add RaspAP Stage
# run: |
# mkdir -p stage-raspap/package-raspap &&
# {
# cat > stage-raspap/package-raspap/00-run-chroot.sh <<-EOF
# #!/bin/bash
# apt-get update -y && apt-get install -y curl dhcpcd5 iptables procps
# curl -sL https://install.raspap.com | bash -s -- --yes --openvpn 1 --restapi 1 --adblock 1 --wireguard 1 --tcp-bbr 1 --check 0

# Set Wi-Fi country to prevent RF kill
raspi-config nonint do_wifi_country "US"
EOF
} &&
chmod +x stage-raspap/package-raspap/00-run-chroot.sh &&
{
cat > stage-raspap/prerun.sh <<-EOF
#!/bin/bash -e
if [ ! -d "\${ROOTFS_DIR}" ]; then
copy_previous
fi
EOF
} &&
chmod +x stage-raspap/prerun.sh
# # Set Wi-Fi country to prevent RF kill
# raspi-config nonint do_wifi_country "US"
# EOF
# } &&
# chmod +x stage-raspap/package-raspap/00-run-chroot.sh &&
# {
# cat > stage-raspap/prerun.sh <<-EOF
# #!/bin/bash -e
# if [ ! -d "\${ROOTFS_DIR}" ]; then
# copy_previous
# fi
# EOF
# } &&
# chmod +x stage-raspap/prerun.sh

- name: Build RaspAP Image
id: build
uses: usimd/pi-gen-action@v1
with:
image-name: "raspap-bookworm-${{ matrix.arch == '32-bit' && 'armhf' || 'arm64' }}-lite-${{ github.event.inputs.tag || github.ref_name }}"
enable-ssh: 1
stage-list: stage0 stage1 stage2 ./stage-raspap
stage-list: stage0 stage1 stage2
# stage-list: stage0 stage1 stage2 ./stage-raspap
verbose-output: true
pi-gen-version: ${{ matrix.pi_gen_version }}
pi-gen-repository: RaspAP/pi-gen

# - name: Upload Artifact
# uses: svenstaro/upload-release-action@v2
# with:
# asset_name: "raspap-bookworm-${{ matrix.arch == '32-bit' && 'armhf' || 'arm64' }}-lite-${{ github.event.inputs.tag || github.ref_name }}.img.zip"
# file: ${{ steps.build.outputs.image-path }}
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# tag: ${{ github.event.inputs.tag || github.ref }}
# overwrite: true

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: rpi-deploy.img.zip
name: rpi-deploy-${{ matrix.arch }}.img.zip
path: ${{ steps.build.outputs.image-path }}

0 comments on commit 1868adf

Please sign in to comment.