mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
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: 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: Unzip and Rename Image File
|
|
run: |
|
|
unzip ${{ steps.build.outputs.image-path }} -d extracted_image
|
|
mv "$(find extracted_image -name "*.img")" "raspap-image-${{ github.ref_name }}-${{ matrix.arch }}.img"
|
|
|
|
- name: Upload Artifact
|
|
uses: svenstaro/upload-release-action@v2
|
|
with:
|
|
file: raspap-image-${{ github.ref_name }}-${{ matrix.arch }}.img
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag: ${{ github.ref }}
|
|
overwrite: true
|
|
file_glob: true
|