build-sunxi-cortexa53-24.10-ImmpotalWrt #9
This file contains 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-sunxi-cortexa53-24.10-ImmpotalWrt | |
on: | |
workflow_dispatch: | |
inputs: | |
profile: | |
type: choice | |
description: "请选择路由器型号" | |
required: true | |
options: | |
- xunlong_orangepi-zero3 | |
- friendlyarm_nanopi-r1s-h5 | |
- xunlong_orangepi-zero2 | |
- xunlong_orangepi-zero-plus | |
- friendlyarm_nanopi-neo2 | |
- xunlong_orangepi-pc2 | |
- friendlyarm_nanopi-neo-plus2 | |
- libretech_all-h3-cc-h5 | |
- pine64_pine64-plus | |
- pine64_sopine-baseboard | |
default: xunlong_orangepi-zero3 | |
include_docker: | |
description: | | |
是否编译 Docker 插件 | |
required: true | |
default: 'no' | |
type: choice | |
options: | |
- 'yes' | |
- 'no' | |
size: | |
description: '请输入要编译固件大小 单位(MB)' | |
required: true | |
default: '1024' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set executable permissions | |
run: | | |
chmod +x ${{ github.workspace }}/sunxi-cortexa53/build.sh | |
- name: Build sunxi-cortexa53 ImmpotalWrt 24.10 | |
run: | | |
profiles="${{ github.event.inputs.profile }}" | |
include_docker="${{ github.event.inputs.include_docker }}" | |
size="${{ github.event.inputs.size }}" | |
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 }}/sunxi-cortexa53/24.10/build.sh:/home/build/immortalwrt/build.sh" \ | |
-e PROFILE=$profile \ | |
-e INCLUDE_DOCKER=$include_docker \ | |
-e ROOTSIZE=$size \ | |
immortalwrt/imagebuilder:sunxi-cortexa53-openwrt-24.10.0-rc3 /bin/bash /home/build/immortalwrt/build.sh | |
done | |
- name: Generate Firmware SHA-256 | |
run: | | |
cp ${{ github.workspace }}/bin/targets/sunxi/cortexa53/*squashfs-sdcard.img.gz ${{ github.workspace }} | |
for file in *.img.gz; do | |
sha256sum "$file" > "$file.sha256" | |
sha256sum -c "$file.sha256" | |
done | |
- name: Create info | |
run: | | |
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then | |
extra_content="### 默认带docker" | |
echo -e "\n $extra_content" >> ${{ github.workspace }}/sunxi-cortexa53/info.md | |
else | |
echo -e "NO docker" | |
fi | |
- name: Create GitHub Release Info | |
uses: softprops/action-gh-release@v2.1.0 | |
with: | |
tag_name: Autobuild-sunxi-cortexa53 | |
name: ImmortalWrt-sunxi-cortexa53 | |
body_path: ${{ github.workspace }}/sunxi-cortexa53/info.md | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload ImmortWrt as release assets | |
uses: softprops/action-gh-release@v2.1.0 | |
with: | |
tag_name: Autobuild-sunxi-cortexa53 | |
files: | | |
${{ github.workspace }}/*.img.gz | |
${{ github.workspace }}/*.sha256 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |