build-x86-64-immortalwrt-24.10 #4
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-x86-64-immortalwrt-24.10 | |
on: | |
workflow_dispatch: # 保留手动触发选项 | |
inputs: | |
profile: | |
description: '请输入要编译固件大小 单位(MB)' | |
required: true | |
default: '1024' | |
schedule: | |
- cron: '0 17 * * *' # UTC 17:00 对应北京时间 01:00 | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set executable permissions | |
run: chmod +x ${{ github.workspace }}/x86-64/build.sh | |
- name: Build ImmortalWrt-x86-64-eif | |
run: | | |
# 如果是通过schedule触发,使用默认值1024 | |
profiles="${{ github.event.inputs.profile || '1024' }}" | |
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 }}/x86-64/imm.config:/home/build/immortalwrt/.config" \ | |
-v "${{ github.workspace }}/x86-64/24.10/build.sh:/home/build/immortalwrt/build.sh" \ | |
-e PROFILE=$profile \ | |
immortalwrt/imagebuilder:x86-64-openwrt-24.10.0-rc3 /bin/bash /home/build/immortalwrt/build.sh | |
done | |
- name: Create GitHub Release Info | |
uses: softprops/action-gh-release@v2.1.0 | |
with: | |
tag_name: Autobuild-x86-64 | |
name: ImmortWrt-x86-64-efi | |
body_path: ${{ github.workspace }}/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-x86-64 | |
files: ${{ github.workspace }}/bin/targets/x86/64/*squashfs-combined-efi.img.gz | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |