Unverified Commit 353e9ad7 authored by wukongdaily's avatar wukongdaily Committed by GitHub
Browse files

新增docker选项

parent ffb14c51
...@@ -7,6 +7,15 @@ on: ...@@ -7,6 +7,15 @@ on:
description: '请输入要编译固件大小 单位(MB)' description: '请输入要编译固件大小 单位(MB)'
required: true required: true
default: '1024' default: '1024'
include_docker:
description: |
是否编译 Docker 插件
required: true
default: 'yes'
type: choice
options:
- 'yes'
- 'no'
jobs: jobs:
build: build:
...@@ -22,6 +31,7 @@ jobs: ...@@ -22,6 +31,7 @@ jobs:
- name: Build ImmortalWrt-x86-64-eif - name: Build ImmortalWrt-x86-64-eif
run: | run: |
profiles="${{ github.event.inputs.profile }}" profiles="${{ github.event.inputs.profile }}"
include_docker="${{ github.event.inputs.include_docker }}"
IFS=',' read -r -a profile_array <<< "$profiles" IFS=',' read -r -a profile_array <<< "$profiles"
...@@ -35,9 +45,18 @@ jobs: ...@@ -35,9 +45,18 @@ jobs:
-v "${{ github.workspace }}/x86-64/imm.config:/home/build/immortalwrt/.config" \ -v "${{ github.workspace }}/x86-64/imm.config:/home/build/immortalwrt/.config" \
-v "${{ github.workspace }}/x86-64/build.sh:/home/build/immortalwrt/build.sh" \ -v "${{ github.workspace }}/x86-64/build.sh:/home/build/immortalwrt/build.sh" \
-e PROFILE=$profile \ -e PROFILE=$profile \
-e INCLUDE_DOCKER=$include_docker \
immortalwrt/imagebuilder:x86-64-openwrt-23.05.4 /bin/bash /home/build/immortalwrt/build.sh immortalwrt/imagebuilder:x86-64-openwrt-23.05.4 /bin/bash /home/build/immortalwrt/build.sh
done done
- name: Create info
run: |
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
extra_content="#### 默认带docker"
echo -e "\n $extra_content" >> ${{ github.workspace }}/info.md
else
echo -e "NO docker"
fi
- name: Create GitHub Release Info - name: Create GitHub Release Info
uses: softprops/action-gh-release@v2.1.0 uses: softprops/action-gh-release@v2.1.0
......
#!/bin/bash #!/bin/bash
echo "编译固件大小为: $PROFILE MB" echo "编译固件大小为: $PROFILE MB"
echo "Include Docker: $INCLUDE_DOCKER"
# 输出调试信息 # 输出调试信息
echo "$(date '+%Y-%m-%d %H:%M:%S') - 开始编译..." echo "$(date '+%Y-%m-%d %H:%M:%S') - 开始编译..."
...@@ -21,7 +22,12 @@ PACKAGES="$PACKAGES luci-i18n-passwall-zh-cn" ...@@ -21,7 +22,12 @@ PACKAGES="$PACKAGES luci-i18n-passwall-zh-cn"
PACKAGES="$PACKAGES luci-app-openclash" PACKAGES="$PACKAGES luci-app-openclash"
PACKAGES="$PACKAGES luci-i18n-homeproxy-zh-cn" PACKAGES="$PACKAGES luci-i18n-homeproxy-zh-cn"
PACKAGES="$PACKAGES openssh-sftp-server" PACKAGES="$PACKAGES openssh-sftp-server"
PACKAGES="$PACKAGES luci-i18n-dockerman-zh-cn"
# 判断是否需要编译 Docker 插件
if [ "$INCLUDE_DOCKER" = "yes" ]; then
PACKAGES="$PACKAGES luci-i18n-dockerman-zh-cn"
echo "Adding package: luci-i18n-dockerman-zh-cn"
fi
# 构建镜像 # 构建镜像
echo "$(date '+%Y-%m-%d %H:%M:%S') - Building image with the following packages:" echo "$(date '+%Y-%m-%d %H:%M:%S') - Building image with the following packages:"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment