From c6fa6f1a2cb28596d97031b5ec40d4649ad4a7f4 Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Tue, 10 Aug 2021 01:26:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20workflow=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8D=E7=A7=B0;=20=E4=BF=AE=E6=94=B9=E5=9B=BA?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E4=BD=BF=E7=94=A8=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/AutoBuild-Test.yml | 35 ++++++++++------ ...-asus_rt-acrh17.yml => asus_rt-acrh17.yml} | 42 +++++++++++++------ ...eam_newifi-d2.yml => d-team_newifi-d2.yml} | 42 +++++++++++++------ ...ovo_newifi-d1.yml => lenovo_newifi-d1.yml} | 42 +++++++++++++------ ...ovo_newifi-y1.yml => lenovo_newifi-y1.yml} | 42 +++++++++++++------ ...{AutoBuild-redmi_ax6.yml => redmi_ax6.yml} | 42 +++++++++++++------ .../{AutoBuild-x86_64.yml => x86_64.yml} | 38 ++++++++++++----- ...100.yml => xiaomi_redmi-router-ac2100.yml} | 42 +++++++++++++------ ...uild-xiaoyu_xy-c5.yml => xiaoyu_xy-c5.yml} | 42 +++++++++++++------ 9 files changed, 261 insertions(+), 106 deletions(-) rename .github/workflows/{AutoBuild-asus_rt-acrh17.yml => asus_rt-acrh17.yml} (82%) rename .github/workflows/{AutoBuild-d-team_newifi-d2.yml => d-team_newifi-d2.yml} (82%) rename .github/workflows/{AutoBuild-lenovo_newifi-d1.yml => lenovo_newifi-d1.yml} (82%) rename .github/workflows/{AutoBuild-lenovo_newifi-y1.yml => lenovo_newifi-y1.yml} (82%) rename .github/workflows/{AutoBuild-redmi_ax6.yml => redmi_ax6.yml} (82%) rename .github/workflows/{AutoBuild-x86_64.yml => x86_64.yml} (82%) rename .github/workflows/{AutoBuild-xiaomi_redmi-router-ac2100.yml => xiaomi_redmi-router-ac2100.yml} (82%) rename .github/workflows/{AutoBuild-xiaoyu_xy-c5.yml => xiaoyu_xy-c5.yml} (82%) diff --git a/.github/workflows/AutoBuild-Test.yml b/.github/workflows/AutoBuild-Test.yml index f774ddd..5629f33 100644 --- a/.github/workflows/AutoBuild-Test.yml +++ b/.github/workflows/AutoBuild-Test.yml @@ -4,7 +4,7 @@ # Author: Hyy2001X # ########################################################### -name: Test_Workflow +name: Test ### 以下内容请保持不变 (请修改下方: 环境变量设置) on: @@ -86,7 +86,6 @@ jobs: echo "Before_IP_Address=${{ github.event.inputs.IP }}" >> $GITHUB_WORKSPACE/Openwrt.info echo "Openwrt_Repository=$REPO_URL" >> $GITHUB_WORKSPACE/Openwrt.info echo "Artifacts_Date=$(date +%m%d%H%M)" >> $GITHUB_ENV - touch Release_info - name: Clone Openwrt Source Code run: | @@ -124,8 +123,7 @@ jobs: make defconfig make download -j$(nproc) make -j$(nproc) || make -j1 V=s - [ $? == 0 ] && Compile_Result=true - echo "Compile_Result=$Compile_Result" >> $GITHUB_ENV + [ $? == 0 ] && echo "Compile_Result=true" >> $GITHUB_ENV - name: Process Firmware if: env.Compile_Result == 'true' && !cancelled() @@ -147,19 +145,32 @@ jobs: name: ${{ env.REPO_BRANCH }}_bin_${{ env.Artifacts_Date }} path: openwrt/bin - - name: Upload Firmware to Github Releases - uses: softprops/action-gh-release@v1 + - name: Upload Firmware to Github Release + uses: svenstaro/upload-release-action@v2 if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: AutoUpdate - body_path: Release_info - files: openwrt/bin/Firmware/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openwrt/bin/Firmware/* + tag: AutoUpdate + overwrite: true + + - name: Download Github Release API + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + run: | + wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API + + - name: Re-Upload API to Github Release + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./API + tag: AutoUpdate + overwrite: true - name: Delete old Workflow Runs uses: GitRML/delete-workflow-runs@main if: env.DELETE_OLD_WORKFLOW == 'true' && !cancelled() with: retain_days: 1 - keep_minimum_runs: 3 \ No newline at end of file + keep_minimum_runs: 3 diff --git a/.github/workflows/AutoBuild-asus_rt-acrh17.yml b/.github/workflows/asus_rt-acrh17.yml similarity index 82% rename from .github/workflows/AutoBuild-asus_rt-acrh17.yml rename to .github/workflows/asus_rt-acrh17.yml index d5d974f..2615b64 100644 --- a/.github/workflows/AutoBuild-asus_rt-acrh17.yml +++ b/.github/workflows/asus_rt-acrh17.yml @@ -4,7 +4,7 @@ # Author: Hyy2001X # ########################################################### -name: asus_rt-acrh17 +name: Asus_ACRH17 ### 以下内容请保持不变 (请修改下方: 环境变量设置) on: @@ -89,7 +89,6 @@ jobs: echo "Before_IP_Address=${{ github.event.inputs.IP }}" >> $GITHUB_WORKSPACE/Openwrt.info echo "Openwrt_Repository=$REPO_URL" >> $GITHUB_WORKSPACE/Openwrt.info echo "Artifacts_Date=$(date +%m%d%H%M)" >> $GITHUB_ENV - touch Release_info - name: Clone Openwrt Source Code run: | @@ -111,6 +110,13 @@ jobs: source $GITHUB_WORKSPACE/openwrt/VARIABLE_FILE && Firmware-Diy rm -f .config && cp $GITHUB_WORKSPACE/Configs/$CONFIG_FILE .config + - name: SSH Connection to Actions + uses: P3TERX/ssh2actions@v1.0.0 + if: (github.event.inputs.SSH == 'true' && github.event.inputs.SSH != 'false') || contains(github.event.action, 'SSH') + env: + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + - name: Compile run: | export Compile_Result=false @@ -120,8 +126,7 @@ jobs: make defconfig make download -j$(nproc) make -j$(nproc) || make -j1 V=s - [ $? == 0 ] && Compile_Result=true - echo "Compile_Result=$Compile_Result" >> $GITHUB_ENV + [ $? == 0 ] && echo "Compile_Result=true" >> $GITHUB_ENV - name: Process Firmware if: env.Compile_Result == 'true' && !cancelled() @@ -143,19 +148,32 @@ jobs: name: ${{ env.REPO_BRANCH }}_bin_${{ env.Artifacts_Date }} path: openwrt/bin - - name: Upload Firmware to Github Releases - uses: softprops/action-gh-release@v1 + - name: Upload Firmware to Github Release + uses: svenstaro/upload-release-action@v2 if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: AutoUpdate - body_path: Release_info - files: openwrt/bin/Firmware/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openwrt/bin/Firmware/* + tag: AutoUpdate + overwrite: true + + - name: Download Github Release API + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + run: | + wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API + + - name: Re-Upload API to Github Release + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./API + tag: AutoUpdate + overwrite: true - name: Delete old Workflow Runs uses: GitRML/delete-workflow-runs@main if: env.DELETE_OLD_WORKFLOW == 'true' && !cancelled() with: retain_days: 1 - keep_minimum_runs: 3 \ No newline at end of file + keep_minimum_runs: 3 diff --git a/.github/workflows/AutoBuild-d-team_newifi-d2.yml b/.github/workflows/d-team_newifi-d2.yml similarity index 82% rename from .github/workflows/AutoBuild-d-team_newifi-d2.yml rename to .github/workflows/d-team_newifi-d2.yml index e5eccba..d1cdcd2 100644 --- a/.github/workflows/AutoBuild-d-team_newifi-d2.yml +++ b/.github/workflows/d-team_newifi-d2.yml @@ -4,7 +4,7 @@ # Author: Hyy2001X # ########################################################### -name: d-team_newifi-d2 +name: Newifi_D2 ### 以下内容请保持不变 (请修改下方: 环境变量设置) on: @@ -89,7 +89,6 @@ jobs: echo "Before_IP_Address=${{ github.event.inputs.IP }}" >> $GITHUB_WORKSPACE/Openwrt.info echo "Openwrt_Repository=$REPO_URL" >> $GITHUB_WORKSPACE/Openwrt.info echo "Artifacts_Date=$(date +%m%d%H%M)" >> $GITHUB_ENV - touch Release_info - name: Clone Openwrt Source Code run: | @@ -111,6 +110,13 @@ jobs: source $GITHUB_WORKSPACE/openwrt/VARIABLE_FILE && Firmware-Diy rm -f .config && cp $GITHUB_WORKSPACE/Configs/$CONFIG_FILE .config + - name: SSH Connection to Actions + uses: P3TERX/ssh2actions@v1.0.0 + if: (github.event.inputs.SSH == 'true' && github.event.inputs.SSH != 'false') || contains(github.event.action, 'SSH') + env: + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + - name: Compile run: | export Compile_Result=false @@ -120,8 +126,7 @@ jobs: make defconfig make download -j$(nproc) make -j$(nproc) || make -j1 V=s - [ $? == 0 ] && Compile_Result=true - echo "Compile_Result=$Compile_Result" >> $GITHUB_ENV + [ $? == 0 ] && echo "Compile_Result=true" >> $GITHUB_ENV - name: Process Firmware if: env.Compile_Result == 'true' && !cancelled() @@ -143,19 +148,32 @@ jobs: name: ${{ env.REPO_BRANCH }}_bin_${{ env.Artifacts_Date }} path: openwrt/bin - - name: Upload Firmware to Github Releases - uses: softprops/action-gh-release@v1 + - name: Upload Firmware to Github Release + uses: svenstaro/upload-release-action@v2 if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: AutoUpdate - body_path: Release_info - files: openwrt/bin/Firmware/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openwrt/bin/Firmware/* + tag: AutoUpdate + overwrite: true + + - name: Download Github Release API + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + run: | + wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API + + - name: Re-Upload API to Github Release + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./API + tag: AutoUpdate + overwrite: true - name: Delete old Workflow Runs uses: GitRML/delete-workflow-runs@main if: env.DELETE_OLD_WORKFLOW == 'true' && !cancelled() with: retain_days: 1 - keep_minimum_runs: 3 \ No newline at end of file + keep_minimum_runs: 3 diff --git a/.github/workflows/AutoBuild-lenovo_newifi-d1.yml b/.github/workflows/lenovo_newifi-d1.yml similarity index 82% rename from .github/workflows/AutoBuild-lenovo_newifi-d1.yml rename to .github/workflows/lenovo_newifi-d1.yml index b83cc9e..d3503d8 100644 --- a/.github/workflows/AutoBuild-lenovo_newifi-d1.yml +++ b/.github/workflows/lenovo_newifi-d1.yml @@ -4,7 +4,7 @@ # Author: Hyy2001X # ########################################################### -name: lenovo_newifi-d1 +name: Newifi_D1 ### 以下内容请保持不变 (请修改下方: 环境变量设置) on: @@ -89,7 +89,6 @@ jobs: echo "Before_IP_Address=${{ github.event.inputs.IP }}" >> $GITHUB_WORKSPACE/Openwrt.info echo "Openwrt_Repository=$REPO_URL" >> $GITHUB_WORKSPACE/Openwrt.info echo "Artifacts_Date=$(date +%m%d%H%M)" >> $GITHUB_ENV - touch Release_info - name: Clone Openwrt Source Code run: | @@ -111,6 +110,13 @@ jobs: source $GITHUB_WORKSPACE/openwrt/VARIABLE_FILE && Firmware-Diy rm -f .config && cp $GITHUB_WORKSPACE/Configs/$CONFIG_FILE .config + - name: SSH Connection to Actions + uses: P3TERX/ssh2actions@v1.0.0 + if: (github.event.inputs.SSH == 'true' && github.event.inputs.SSH != 'false') || contains(github.event.action, 'SSH') + env: + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + - name: Compile run: | export Compile_Result=false @@ -120,8 +126,7 @@ jobs: make defconfig make download -j$(nproc) make -j$(nproc) || make -j1 V=s - [ $? == 0 ] && Compile_Result=true - echo "Compile_Result=$Compile_Result" >> $GITHUB_ENV + [ $? == 0 ] && echo "Compile_Result=true" >> $GITHUB_ENV - name: Process Firmware if: env.Compile_Result == 'true' && !cancelled() @@ -143,19 +148,32 @@ jobs: name: ${{ env.REPO_BRANCH }}_bin_${{ env.Artifacts_Date }} path: openwrt/bin - - name: Upload Firmware to Github Releases - uses: softprops/action-gh-release@v1 + - name: Upload Firmware to Github Release + uses: svenstaro/upload-release-action@v2 if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: AutoUpdate - body_path: Release_info - files: openwrt/bin/Firmware/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openwrt/bin/Firmware/* + tag: AutoUpdate + overwrite: true + + - name: Download Github Release API + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + run: | + wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API + + - name: Re-Upload API to Github Release + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./API + tag: AutoUpdate + overwrite: true - name: Delete old Workflow Runs uses: GitRML/delete-workflow-runs@main if: env.DELETE_OLD_WORKFLOW == 'true' && !cancelled() with: retain_days: 1 - keep_minimum_runs: 3 \ No newline at end of file + keep_minimum_runs: 3 diff --git a/.github/workflows/AutoBuild-lenovo_newifi-y1.yml b/.github/workflows/lenovo_newifi-y1.yml similarity index 82% rename from .github/workflows/AutoBuild-lenovo_newifi-y1.yml rename to .github/workflows/lenovo_newifi-y1.yml index d6ac14e..8b86b2c 100644 --- a/.github/workflows/AutoBuild-lenovo_newifi-y1.yml +++ b/.github/workflows/lenovo_newifi-y1.yml @@ -4,7 +4,7 @@ # Author: Hyy2001X # ########################################################### -name: lenovo_newifi-y1 +name: Newifi_Y1 ### 以下内容请保持不变 (请修改下方: 环境变量设置) on: @@ -89,7 +89,6 @@ jobs: echo "Before_IP_Address=${{ github.event.inputs.IP }}" >> $GITHUB_WORKSPACE/Openwrt.info echo "Openwrt_Repository=$REPO_URL" >> $GITHUB_WORKSPACE/Openwrt.info echo "Artifacts_Date=$(date +%m%d%H%M)" >> $GITHUB_ENV - touch Release_info - name: Clone Openwrt Source Code run: | @@ -111,6 +110,13 @@ jobs: source $GITHUB_WORKSPACE/openwrt/VARIABLE_FILE && Firmware-Diy rm -f .config && cp $GITHUB_WORKSPACE/Configs/$CONFIG_FILE .config + - name: SSH Connection to Actions + uses: P3TERX/ssh2actions@v1.0.0 + if: (github.event.inputs.SSH == 'true' && github.event.inputs.SSH != 'false') || contains(github.event.action, 'SSH') + env: + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + - name: Compile run: | export Compile_Result=false @@ -120,8 +126,7 @@ jobs: make defconfig make download -j$(nproc) make -j$(nproc) || make -j1 V=s - [ $? == 0 ] && Compile_Result=true - echo "Compile_Result=$Compile_Result" >> $GITHUB_ENV + [ $? == 0 ] && echo "Compile_Result=true" >> $GITHUB_ENV - name: Process Firmware if: env.Compile_Result == 'true' && !cancelled() @@ -143,19 +148,32 @@ jobs: name: ${{ env.REPO_BRANCH }}_bin_${{ env.Artifacts_Date }} path: openwrt/bin - - name: Upload Firmware to Github Releases - uses: softprops/action-gh-release@v1 + - name: Upload Firmware to Github Release + uses: svenstaro/upload-release-action@v2 if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: AutoUpdate - body_path: Release_info - files: openwrt/bin/Firmware/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openwrt/bin/Firmware/* + tag: AutoUpdate + overwrite: true + + - name: Download Github Release API + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + run: | + wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API + + - name: Re-Upload API to Github Release + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./API + tag: AutoUpdate + overwrite: true - name: Delete old Workflow Runs uses: GitRML/delete-workflow-runs@main if: env.DELETE_OLD_WORKFLOW == 'true' && !cancelled() with: retain_days: 1 - keep_minimum_runs: 3 \ No newline at end of file + keep_minimum_runs: 3 diff --git a/.github/workflows/AutoBuild-redmi_ax6.yml b/.github/workflows/redmi_ax6.yml similarity index 82% rename from .github/workflows/AutoBuild-redmi_ax6.yml rename to .github/workflows/redmi_ax6.yml index 04a1e1e..6179880 100644 --- a/.github/workflows/AutoBuild-redmi_ax6.yml +++ b/.github/workflows/redmi_ax6.yml @@ -4,7 +4,7 @@ # Author: Hyy2001X # ########################################################### -name: redmi_ax6 +name: Redmi_AX6 ### 以下内容请保持不变 (请修改下方: 环境变量设置) on: @@ -89,7 +89,6 @@ jobs: echo "Before_IP_Address=${{ github.event.inputs.IP }}" >> $GITHUB_WORKSPACE/Openwrt.info echo "Openwrt_Repository=$REPO_URL" >> $GITHUB_WORKSPACE/Openwrt.info echo "Artifacts_Date=$(date +%m%d%H%M)" >> $GITHUB_ENV - touch Release_info - name: Clone Openwrt Source Code run: | @@ -111,6 +110,13 @@ jobs: source $GITHUB_WORKSPACE/openwrt/VARIABLE_FILE && Firmware-Diy rm -f .config && cp $GITHUB_WORKSPACE/Configs/$CONFIG_FILE .config + - name: SSH Connection to Actions + uses: P3TERX/ssh2actions@v1.0.0 + if: (github.event.inputs.SSH == 'true' && github.event.inputs.SSH != 'false') || contains(github.event.action, 'SSH') + env: + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + - name: Compile run: | export Compile_Result=false @@ -120,8 +126,7 @@ jobs: make defconfig make download -j$(nproc) make -j$(nproc) || make -j1 V=s - [ $? == 0 ] && Compile_Result=true - echo "Compile_Result=$Compile_Result" >> $GITHUB_ENV + [ $? == 0 ] && echo "Compile_Result=true" >> $GITHUB_ENV - name: Process Firmware if: env.Compile_Result == 'true' && !cancelled() @@ -143,19 +148,32 @@ jobs: name: ${{ env.REPO_BRANCH }}_bin_${{ env.Artifacts_Date }} path: openwrt/bin - - name: Upload Firmware to Github Releases - uses: softprops/action-gh-release@v1 + - name: Upload Firmware to Github Release + uses: svenstaro/upload-release-action@v2 if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: AutoUpdate - body_path: Release_info - files: openwrt/bin/Firmware/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openwrt/bin/Firmware/* + tag: AutoUpdate + overwrite: true + + - name: Download Github Release API + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + run: | + wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API + + - name: Re-Upload API to Github Release + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./API + tag: AutoUpdate + overwrite: true - name: Delete old Workflow Runs uses: GitRML/delete-workflow-runs@main if: env.DELETE_OLD_WORKFLOW == 'true' && !cancelled() with: retain_days: 1 - keep_minimum_runs: 3 \ No newline at end of file + keep_minimum_runs: 3 diff --git a/.github/workflows/AutoBuild-x86_64.yml b/.github/workflows/x86_64.yml similarity index 82% rename from .github/workflows/AutoBuild-x86_64.yml rename to .github/workflows/x86_64.yml index 811e321..086d918 100644 --- a/.github/workflows/AutoBuild-x86_64.yml +++ b/.github/workflows/x86_64.yml @@ -89,7 +89,6 @@ jobs: echo "Before_IP_Address=${{ github.event.inputs.IP }}" >> $GITHUB_WORKSPACE/Openwrt.info echo "Openwrt_Repository=$REPO_URL" >> $GITHUB_WORKSPACE/Openwrt.info echo "Artifacts_Date=$(date +%m%d%H%M)" >> $GITHUB_ENV - touch Release_info - name: Clone Openwrt Source Code run: | @@ -111,6 +110,13 @@ jobs: source $GITHUB_WORKSPACE/openwrt/VARIABLE_FILE && Firmware-Diy rm -f .config && cp $GITHUB_WORKSPACE/Configs/$CONFIG_FILE .config + - name: SSH Connection to Actions + uses: P3TERX/ssh2actions@v1.0.0 + if: (github.event.inputs.SSH == 'true' && github.event.inputs.SSH != 'false') || contains(github.event.action, 'SSH') + env: + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + - name: Compile run: | export Compile_Result=false @@ -120,8 +126,7 @@ jobs: make defconfig make download -j$(nproc) make -j$(nproc) || make -j1 V=s - [ $? == 0 ] && Compile_Result=true - echo "Compile_Result=$Compile_Result" >> $GITHUB_ENV + [ $? == 0 ] && echo "Compile_Result=true" >> $GITHUB_ENV - name: Process Firmware if: env.Compile_Result == 'true' && !cancelled() @@ -143,15 +148,28 @@ jobs: name: ${{ env.REPO_BRANCH }}_bin_${{ env.Artifacts_Date }} path: openwrt/bin - - name: Upload Firmware to Github Releases - uses: softprops/action-gh-release@v1 + - name: Upload Firmware to Github Release + uses: svenstaro/upload-release-action@v2 if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: AutoUpdate - body_path: Release_info - files: openwrt/bin/Firmware/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openwrt/bin/Firmware/* + tag: AutoUpdate + overwrite: true + + - name: Download Github Release API + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + run: | + wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API + + - name: Re-Upload API to Github Release + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./API + tag: AutoUpdate + overwrite: true - name: Delete old Workflow Runs uses: GitRML/delete-workflow-runs@main diff --git a/.github/workflows/AutoBuild-xiaomi_redmi-router-ac2100.yml b/.github/workflows/xiaomi_redmi-router-ac2100.yml similarity index 82% rename from .github/workflows/AutoBuild-xiaomi_redmi-router-ac2100.yml rename to .github/workflows/xiaomi_redmi-router-ac2100.yml index a90ae81..0f28c50 100644 --- a/.github/workflows/AutoBuild-xiaomi_redmi-router-ac2100.yml +++ b/.github/workflows/xiaomi_redmi-router-ac2100.yml @@ -4,7 +4,7 @@ # Author: Hyy2001X # ########################################################### -name: xiaomi_redmi-router-ac2100 +name: Redmi_AC2100 ### 以下内容请保持不变 (请修改下方: 环境变量设置) on: @@ -89,7 +89,6 @@ jobs: echo "Before_IP_Address=${{ github.event.inputs.IP }}" >> $GITHUB_WORKSPACE/Openwrt.info echo "Openwrt_Repository=$REPO_URL" >> $GITHUB_WORKSPACE/Openwrt.info echo "Artifacts_Date=$(date +%m%d%H%M)" >> $GITHUB_ENV - touch Release_info - name: Clone Openwrt Source Code run: | @@ -111,6 +110,13 @@ jobs: source $GITHUB_WORKSPACE/openwrt/VARIABLE_FILE && Firmware-Diy rm -f .config && cp $GITHUB_WORKSPACE/Configs/$CONFIG_FILE .config + - name: SSH Connection to Actions + uses: P3TERX/ssh2actions@v1.0.0 + if: (github.event.inputs.SSH == 'true' && github.event.inputs.SSH != 'false') || contains(github.event.action, 'SSH') + env: + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + - name: Compile run: | export Compile_Result=false @@ -120,8 +126,7 @@ jobs: make defconfig make download -j$(nproc) make -j$(nproc) || make -j1 V=s - [ $? == 0 ] && Compile_Result=true - echo "Compile_Result=$Compile_Result" >> $GITHUB_ENV + [ $? == 0 ] && echo "Compile_Result=true" >> $GITHUB_ENV - name: Process Firmware if: env.Compile_Result == 'true' && !cancelled() @@ -143,19 +148,32 @@ jobs: name: ${{ env.REPO_BRANCH }}_bin_${{ env.Artifacts_Date }} path: openwrt/bin - - name: Upload Firmware to Github Releases - uses: softprops/action-gh-release@v1 + - name: Upload Firmware to Github Release + uses: svenstaro/upload-release-action@v2 if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: AutoUpdate - body_path: Release_info - files: openwrt/bin/Firmware/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openwrt/bin/Firmware/* + tag: AutoUpdate + overwrite: true + + - name: Download Github Release API + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + run: | + wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API + + - name: Re-Upload API to Github Release + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./API + tag: AutoUpdate + overwrite: true - name: Delete old Workflow Runs uses: GitRML/delete-workflow-runs@main if: env.DELETE_OLD_WORKFLOW == 'true' && !cancelled() with: retain_days: 1 - keep_minimum_runs: 3 \ No newline at end of file + keep_minimum_runs: 3 diff --git a/.github/workflows/AutoBuild-xiaoyu_xy-c5.yml b/.github/workflows/xiaoyu_xy-c5.yml similarity index 82% rename from .github/workflows/AutoBuild-xiaoyu_xy-c5.yml rename to .github/workflows/xiaoyu_xy-c5.yml index 5f97116..82d106d 100644 --- a/.github/workflows/AutoBuild-xiaoyu_xy-c5.yml +++ b/.github/workflows/xiaoyu_xy-c5.yml @@ -4,7 +4,7 @@ # Author: Hyy2001X # ########################################################### -name: xiaoyu_xy-c5 +name: Xiaoyu_Series ### 以下内容请保持不变 (请修改下方: 环境变量设置) on: @@ -89,7 +89,6 @@ jobs: echo "Before_IP_Address=${{ github.event.inputs.IP }}" >> $GITHUB_WORKSPACE/Openwrt.info echo "Openwrt_Repository=$REPO_URL" >> $GITHUB_WORKSPACE/Openwrt.info echo "Artifacts_Date=$(date +%m%d%H%M)" >> $GITHUB_ENV - touch Release_info - name: Clone Openwrt Source Code run: | @@ -111,6 +110,13 @@ jobs: source $GITHUB_WORKSPACE/openwrt/VARIABLE_FILE && Firmware-Diy rm -f .config && cp $GITHUB_WORKSPACE/Configs/$CONFIG_FILE .config + - name: SSH Connection to Actions + uses: P3TERX/ssh2actions@v1.0.0 + if: (github.event.inputs.SSH == 'true' && github.event.inputs.SSH != 'false') || contains(github.event.action, 'SSH') + env: + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + - name: Compile run: | export Compile_Result=false @@ -120,8 +126,7 @@ jobs: make defconfig make download -j$(nproc) make -j$(nproc) || make -j1 V=s - [ $? == 0 ] && Compile_Result=true - echo "Compile_Result=$Compile_Result" >> $GITHUB_ENV + [ $? == 0 ] && echo "Compile_Result=true" >> $GITHUB_ENV - name: Process Firmware if: env.Compile_Result == 'true' && !cancelled() @@ -143,19 +148,32 @@ jobs: name: ${{ env.REPO_BRANCH }}_bin_${{ env.Artifacts_Date }} path: openwrt/bin - - name: Upload Firmware to Github Releases - uses: softprops/action-gh-release@v1 + - name: Upload Firmware to Github Release + uses: svenstaro/upload-release-action@v2 if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: AutoUpdate - body_path: Release_info - files: openwrt/bin/Firmware/* + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: openwrt/bin/Firmware/* + tag: AutoUpdate + overwrite: true + + - name: Download Github Release API + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + run: | + wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API + + - name: Re-Upload API to Github Release + if: env.UPLOAD_RELEASES == 'true' && env.Compile_Result == 'true' && !cancelled() + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./API + tag: AutoUpdate + overwrite: true - name: Delete old Workflow Runs uses: GitRML/delete-workflow-runs@main if: env.DELETE_OLD_WORKFLOW == 'true' && !cancelled() with: retain_days: 1 - keep_minimum_runs: 3 \ No newline at end of file + keep_minimum_runs: 3