Version 3.5.5 #31
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | |
| release: "trixie" | |
| - arch: "64-bit" | |
| pi_gen_version: "arm64" | |
| release: "trixie" | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Add RaspAP Stage | |
| run: sh ./.github/scripts/add-raspap-stage.sh | |
| - name: Build RaspAP Image | |
| id: build | |
| uses: usimd/pi-gen-action@v1.11.0 | |
| with: | |
| release: ${{ matrix.release }} | |
| image-name: "raspap-${{ matrix.release }}-${{ matrix.arch == '32-bit' && 'armhf' || 'arm64' }}-lite-${{ github.event.inputs.tag || github.ref_name }}" | |
| enable-ssh: 1 | |
| 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-${{ matrix.release }}-${{ 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 | |
| torrent: | |
| needs: build-raspap-image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Generate torrents for release | |
| uses: devopsx/action-torrent@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| local: false | |
| update-os-list: | |
| needs: torrent | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| fetch-depth: 0 | |
| - name: Get release information | |
| id: release | |
| run: | | |
| VERSION="${{ github.event.release.tag_name }}" | |
| RELEASE_DATE=$(echo "${{ github.event.release.published_at }}" | cut -d'T' -f1) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "release_date=$RELEASE_DATE" >> $GITHUB_OUTPUT | |
| echo "Found release: $VERSION (published: $RELEASE_DATE)" | |
| - name: Download release assets and generate OS list | |
| env: | |
| VERSION: ${{ steps.release.outputs.version }} | |
| RELEASE_DATE: ${{ steps.release.outputs.release_date }} | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| cd installers | |
| echo "Downloading release assets for $VERSION..." | |
| gh release download "$VERSION" \ | |
| --pattern "raspap-trixie-armhf-lite-*.img.zip" \ | |
| --pattern "raspap-trixie-arm64-lite-*.img.zip" | |
| chmod +x ./generate_os_list.sh | |
| ./generate_os_list.sh | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add installers/os-subitem.json | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -m "Update OS list for RPi Imager (${{ steps.release.outputs.version }})" | |
| git push | |
| fi |