From cb4fc2ac54195f1ffefc0fdba1a420731e22a196 Mon Sep 17 00:00:00 2001 From: Dhanus Date: Thu, 31 Oct 2024 14:43:34 +0530 Subject: [PATCH] ci: Add build for 32/64 bit images --- .github/workflows/release.yml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..98347a86 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: Build and publish RaspAP images + +permissions: + contents: write + +on: + release: + types: [published] + +jobs: + build-raspap-image: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - arch: "32-bit" + pi_gen_version: "master" + - arch: "64-bit" + pi_gen_version: "arm64" + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Update and install Git + run: | + sudo apt-get update + sudo apt-get install -y git + + - name: Build RaspAP Image + id: build + uses: usimd/pi-gen-action@v1 + with: + image-name: "raspap-${{ github.ref_name }}-${{ matrix.arch }}" + enable-ssh: 1 + stage-list: stage0 stage1 stage2 + verbose-output: true + pi-gen-version: ${{ matrix.pi_gen_version }} + + - name: Upload Artifact + uses: svenstaro/upload-release-action@v2 + with: + asset_name: raspap-image-${{ github.ref_name }}-${{ matrix.arch }} + file: ${{ steps.build.outputs.image-path }} + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + overwrite: true