Update core_auto_update.yml

This commit is contained in:
juewuy
2024-03-30 13:44:09 +08:00
committed by GitHub
parent 9a34a401c6
commit afc81c884b

View File

@@ -9,23 +9,18 @@ jobs:
check_version: check_version:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Get old version
run: |
version_old=$(curl -sSl https://github.com/juewuy/ShellCrash/releases/download/singbox_core_PuerNya/version)
#echo version_old=$version_old >> "$GITHUB_OUTPUT"
- name: checkout - name: checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
repository: PuerNya/sing-box repository: PuerNya/sing-box
ref: building ref: building
fetch-depth: 0 fetch-depth: 0
- name: Get new version - name: Check version
run: | run: |
git remote add sekai https://github.com/SagerNet/sing-box.git git remote add sekai https://github.com/SagerNet/sing-box.git
git fetch --tags sekai git fetch --tags sekai
version_new=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag) version_new=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag)
#echo version_new=$version_new >> "$GITHUB_OUTPUT" version_old=$(curl -sSl https://github.com/juewuy/ShellCrash/releases/download/singbox_core_PuerNya/version)
if [ $version_old = $version_new ];then if [ $version_old = $version_new ];then
echo "未检查到版本更新,已退出!" echo "未检查到版本更新,已退出!"
exit 1 exit 1
@@ -33,7 +28,7 @@ jobs:
auto_update_singboxp_with_wg: auto_update_singboxp_with_wg:
needs: check_version needs: check_version
if: ${{ needs.check_version.outputs.version_new != needs.check_version.outputs.version_old }} if: ${{ success() }}
permissions: write-all permissions: write-all
uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev
with: with: