Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/build-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ on:
description: '请输入下载地址(扩展名 .img.gz/.img.xz/.img.zip)'
required: true
default: 'https://default.example.com/file.img.gz'
publish:
description: '是否创建或更新 GitHub Release'
required: false
default: true
type: boolean

# 显式添加权限,确保 Release 发布正常
# Release 上传需要写权限;仓库若采用只读默认权限,显式声明可避免 403。
permissions:
contents: write

Expand All @@ -17,10 +22,12 @@ jobs:
build-release:
name: "Build and Release"
runs-on: "ubuntu-22.04"
env:
DOWNLOAD_URL: ${{ inputs.download_url }}

steps:
- name: "Checking out git repository"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set executable permissions
run: |
Expand All @@ -30,25 +37,24 @@ jobs:
- name: Validate Download URL
run: |
DEFAULT_URL="https://default.example.com/file.img.gz"
USER_INPUT_URL="${{ github.event.inputs.download_url }}"

if [[ "$USER_INPUT_URL" == "$DEFAULT_URL" ]]; then
if [[ "$DOWNLOAD_URL" == "$DEFAULT_URL" ]]; then
echo "❌ 错误:请修改默认下载地址!当前地址为无效占位符。"
exit 1
fi

if [[ ! "$USER_INPUT_URL" =~ ^https?://.+\.[gG][zZ]$|^https?://.+\.[xX][zZ]$|^https?://.+\.[zZ][iI][pP]$ ]]; then
if [[ ! "$DOWNLOAD_URL" =~ ^https?://[^[:space:]]+\.(gz|xz|zip)(\?[^[:space:]]*)?$ ]]; then
echo "❌ 错误:地址需以 http(s) 开头且扩展名为 .gz/.xz/.zip"
echo "当前输入:$USER_INPUT_URL"
echo "当前输入:$DOWNLOAD_URL"
exit 1
fi

- name: "Build Image"
run: |
download_url="${{ github.event.inputs.download_url }}"
./custom.sh "$download_url"
bash ./custom.sh "$DOWNLOAD_URL"

- name: "Publish"
if: ${{ inputs.publish }}
uses: softprops/action-gh-release@v2.2.1
with:
tag_name: "Custom-Installer-x86_64-ISO"
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/build-esiropenwrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: "Build eSirOpenWrt Installer ISO"

on:
workflow_dispatch:
inputs:
publish:
description: "是否创建或更新 GitHub Release"
required: false
default: true
type: boolean

permissions:
contents: write

jobs:
build-release:
Expand All @@ -11,21 +20,22 @@ jobs:
steps:
- name: "Get Date"
run: |
echo "DATESTAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
echo "DATESTAMP=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"

- name: "Checking out git repository"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set executable permissions
run: |
chmod +x ${{ github.workspace }}/esir.sh
chmod +x ${{ github.workspace }}/supportFiles/esirplayground/build.sh
chmod +x "${{ github.workspace }}/esir.sh"
chmod +x "${{ github.workspace }}/supportFiles/esirplayground/build.sh"

- name: "Build Image"
run: |
./esir.sh

- name: "Publish"
if: ${{ inputs.publish }}
uses: softprops/action-gh-release@v2.2.1
with:
tag_name: "eSirOpenWrt-Installer-x86_64-ISO"
Expand Down
33 changes: 28 additions & 5 deletions .github/workflows/build-ezopwrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,53 @@ name: "Build EzOpWrt Installer ISO"

on:
workflow_dispatch:
inputs:
download_url:
description: "EzOpWrt 上游固件直链(.img.gz/.img.xz/.img.zip)"
required: true
publish:
description: "是否创建或更新 GitHub Release"
required: false
default: true
type: boolean

permissions:
contents: write

jobs:
build-release:
name: "Build and Release"
runs-on: "ubuntu-22.04"
env:
DOWNLOAD_URL: ${{ inputs.download_url }}

steps:
- name: "Get Date"
run: |
echo "DATESTAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
echo "DATESTAMP=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"

- name: "Checking out git repository"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set executable permissions
run: |
chmod +x ${{ github.workspace }}/ezopwrt.sh
chmod +x ${{ github.workspace }}/supportFiles/ezopwrt/build.sh
chmod +x "${{ github.workspace }}/ezopwrt.sh"
chmod +x "${{ github.workspace }}/supportFiles/ezopwrt/build.sh"

- name: Validate Download URL
run: |
if [[ ! "$DOWNLOAD_URL" =~ ^https?://[^[:space:]]+\.(gz|xz|zip)(\?[^[:space:]]*)?$ ]]; then
echo "❌ 错误:地址需以 http(s) 开头且扩展名为 .gz/.xz/.zip"
echo "当前输入:$DOWNLOAD_URL"
exit 1
fi

- name: "Build Image"
run: |
./ezopwrt.sh
bash ./ezopwrt.sh "$DOWNLOAD_URL"

- name: "Publish"
if: ${{ inputs.publish }}
uses: softprops/action-gh-release@v2.2.1
with:
tag_name: "EzOpWrt-Installer-x86_64-ISO"
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/build-haos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,25 @@ on:
description: '请输入haos下载地址(扩展名 .img.gz/.img.xz/.img.zip)'
required: true
default: 'https://github.com/home-assistant/operating-system/releases/download/15.0/haos_generic-x86-64-15.0.img.xz'
publish:
description: '是否创建或更新 GitHub Release'
required: false
default: true
type: boolean

permissions:
contents: write

jobs:
build-release:
name: "Build and Release"
runs-on: "ubuntu-22.04"
env:
DOWNLOAD_URL: ${{ inputs.download_url }}

steps:
- name: "Checking out git repository"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set executable permissions
run: |
Expand All @@ -24,24 +34,22 @@ jobs:

- name: Validate Download URL
run: |
USER_INPUT_URL="${{ github.event.inputs.download_url }}"

if [[ ! "$USER_INPUT_URL" =~ ^https?://.+\.[gG][zZ]$|^https?://.+\.[xX][zZ]$|^https?://.+\.[zZ][iI][pP]$ ]]; then
if [[ ! "$DOWNLOAD_URL" =~ ^https?://[^[:space:]]+\.(gz|xz|zip)(\?[^[:space:]]*)?$ ]]; then
echo "❌ 错误:地址需以 http(s) 开头且扩展名为 .gz/.xz/.zip"
echo "当前输入:$USER_INPUT_URL"
echo "当前输入:$DOWNLOAD_URL"
exit 1
fi

- name: "Build Image"
run: |
download_url="${{ github.event.inputs.download_url }}"
./haos.sh "$download_url"
bash ./haos.sh "$DOWNLOAD_URL"

- name: "Publish"
if: ${{ inputs.publish }}
uses: softprops/action-gh-release@v2.2.1
with:
tag_name: "HAOS-Installer-x86_64-ISO"
body_path: "${{ github.workspace }}/supportFiles/haos/info.md"
files: |
output/haos-installer-x86_64.iso
token: "${{ secrets.GITHUB_TOKEN }}"
token: "${{ secrets.GITHUB_TOKEN }}"
26 changes: 21 additions & 5 deletions .github/workflows/build-imm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,46 @@ name: "Build ImmortalWrt Installer ISO"

on:
workflow_dispatch:
inputs:
upstream_version:
description: "ImmortalWrt 版本;latest 自动选择上游 x86-64 EFI 固件"
required: true
default: "latest"
publish:
description: "是否创建或更新 GitHub Release"
required: false
default: true
type: boolean

permissions:
contents: write

jobs:
build-release:
name: "Build and Release"
runs-on: "ubuntu-22.04"
env:
IMMORTALWRT_VERSION: ${{ inputs.upstream_version }}

steps:
- name: "Get Date"
run: |
echo "DATESTAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
echo "DATESTAMP=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"

- name: "Checking out git repository"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set executable permissions
run: |
chmod +x ${{ github.workspace }}/imm.sh
chmod +x ${{ github.workspace }}/supportFiles/immortalwrt/build.sh
chmod +x "${{ github.workspace }}/imm.sh"
chmod +x "${{ github.workspace }}/supportFiles/immortalwrt/build.sh"

- name: "Build Image"
run: |
./imm.sh
bash ./imm.sh

- name: "Publish"
if: ${{ inputs.publish }}
uses: softprops/action-gh-release@v2.2.1
with:
tag_name: "ImmortalWrt-Installer-x86_64-ISO"
Expand Down
26 changes: 21 additions & 5 deletions .github/workflows/build-istoreos-24.10.1.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,44 @@
name: "Build iStoreOS 24.10.1 Installer ISO"
name: "Build iStoreOS Installer ISO"

on:
workflow_dispatch:
inputs:
upstream_release:
description: "上游 Release 标签;latest 自动选择最新 iStoreOS x86-64 固件"
required: true
default: "latest"
publish:
description: "是否创建或更新 GitHub Release"
required: false
default: true
type: boolean

permissions:
contents: write

jobs:
build-release:
name: "Build and Release"
runs-on: "ubuntu-22.04"
env:
ISTOREOS_RELEASE: ${{ inputs.upstream_release }}

steps:

- name: "Checking out git repository"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set executable permissions
run: |
chmod +x ${{ github.workspace }}/istoreos.sh
chmod +x ${{ github.workspace }}/supportFiles/istoreos/build.sh
chmod +x "${{ github.workspace }}/istoreos.sh"
chmod +x "${{ github.workspace }}/supportFiles/istoreos/build.sh"

- name: "Build iStoreOS Installer ISO"
run: |
./istoreos.sh
bash ./istoreos.sh

- name: "Publish"
if: ${{ inputs.publish }}
uses: softprops/action-gh-release@v2.2.1
with:
tag_name: "iStoreOS-Installer-x86_64-ISO"
Expand Down
32 changes: 28 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,39 @@ on:
- "debian12_minimal"
- "ubuntu24_minimal"
- "homeassistant_debian12_minimal"
upstream_release:
description: "上游固件 Release 标签;latest 会自动选择匹配类型的最新版本"
required: true
default: "latest"
publish:
description: "是否创建或更新 GitHub Release"
required: false
default: true
type: boolean

permissions:
contents: write

jobs:
build-release:
runs-on: ubuntu-22.04
env:
VERSION_TYPE: ${{ github.event.inputs.version_type }}
VERSION_TYPE: ${{ inputs.version_type }}
ARMBIAN_RELEASE: ${{ inputs.upstream_release }}

steps:
- uses: actions/checkout@v4

- name: Build Image
run: ./build.sh
run: bash ./build.sh

- name: Report selected upstream firmware
run: |
{
echo "### 上游固件"
echo "- Release: \`${ARMBIAN_SELECTED_RELEASE}\`"
echo "- Asset: \`${ARMBIAN_SELECTED_ASSET}\`"
} >> "$GITHUB_STEP_SUMMARY"

- name: "Prepare Release Assets"
run: |
Expand All @@ -40,13 +61,16 @@ jobs:
if [ "$VERSION_TYPE" = "homeassistant_debian12_minimal" ]; then
mv output/armbian-installer-x86_64-standard.iso output/armbian-installer-x86_64-homeassistant_debian12_minimal.iso
fi

test -s "output/armbian-installer-x86_64-${VERSION_TYPE}.iso"


- name: "Publish"
if: ${{ inputs.publish }}
uses: softprops/action-gh-release@v2.2.1
with:
tag_name: "Armbian-Installer-x86_64-ISO"
body_path: ${{ github.workspace }}/info.md
files: |
output/armbian-installer-x86_64-${{ github.event.inputs.version_type }}.iso
token: ${{ secrets.GITHUB_TOKEN }}
output/armbian-installer-x86_64-${{ inputs.version_type }}.iso
token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 4 additions & 3 deletions autobuild/autobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ else
fi

mkdir -p output
repo_root="$(pwd -P)"
docker run --privileged --rm \
-v $(pwd)/output:/output \
-v $(pwd)/supportFiles:/supportFiles:ro \
-v $(pwd)/imm/custom.img:/mnt/custom.img \
-v "${repo_root}/output:/output" \
-v "${repo_root}/supportFiles:/supportFiles:ro" \
-v "${repo_root}/imm/custom.img:/mnt/custom.img:ro" \
debian:buster \
/supportFiles/custom/build.sh
Loading
Loading