name: build-rockchip on: workflow_dispatch: inputs: profile: description: '手动输入的多个 profile,并按逗号分隔' required: true default: 'friendlyarm_nanopi-r3s,radxa_zero-3e' rootfs_partsize: description: '设置根文件系统分区大小 (MB)' required: true default: '512' jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Set executable permissions run: chmod +x ${{ github.workspace }}/rockchip/build.sh - name: Setup Docker and Build run: | profiles="${{ github.event.inputs.profile }}" rootfs_partsize="${{ github.event.inputs.rootfs_partsize }}" IFS=',' read -r -a profile_array <<< "$profiles" for profile in "${profile_array[@]}"; do echo "Building for profile: $profile" docker run --rm -i \ --user root \ -v "${{ github.workspace }}/bin:/home/build/immortalwrt/bin" \ -v "${{ github.workspace }}/files:/home/build/immortalwrt/files" \ -v "${{ github.workspace }}/rockchip/build.sh:/home/build/immortalwrt/build.sh" \ -e PROFILE=$profile \ -e ROOTFS_PARTSIZE=$rootfs_partsize \ immortalwrt/imagebuilder:rockchip-armv8-openwrt-24.10 /bin/bash /home/build/immortalwrt/build.sh done - name: Locate squashfs firmware files id: locate_files run: | firmware_files=$(find "${{ github.workspace }}/bin" -type f -name '*squashfs*.img.gz') firmware_files=$(echo "$firmware_files" | tr '\n' ' ') echo "Squashfs firmware files located:" echo "$firmware_files" echo "firmware_paths=$firmware_files" >> $GITHUB_ENV - name: Upload Release Asset(s) uses: sekwah41/upload-release-assets@v1.1.0 with: files: ${{ env.firmware_paths }} repo_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref_name }}