优化
This commit is contained in:
27
.github/workflows/core_auto_update.yml
vendored
27
.github/workflows/core_auto_update.yml
vendored
@@ -2,14 +2,33 @@ name: core_auto_update
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: 0 18 * * 6
|
||||
- cron: 0 18 * * *
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check_version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get old version
|
||||
run: |
|
||||
echo version_old=$(curl -sSl https://github.com/juewuy/ShellCrash/releases/download/singbox_core_PuerNya/version) >> $GITHUB_OUTPUT
|
||||
|
||||
- name: checkout
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: PuerNya/sing-box
|
||||
ref: building
|
||||
fetch-depth: 0
|
||||
- name: Get new version
|
||||
run: |
|
||||
git remote add sekai https://github.com/SagerNet/sing-box.git
|
||||
git fetch --tags sekai
|
||||
echo version_new=$(CGO_ENABLED=0 go run ./cmd/internal/read_tag) >> $GITHUB_OUTPUT
|
||||
|
||||
auto_update_singboxp_with_wg:
|
||||
permissions:
|
||||
id-token: write # need this for OIDC
|
||||
contents: write
|
||||
needs: check_version
|
||||
if: ${{ needs.check_version.outputs.version_new != needs.check_version.outputs.version_old }}
|
||||
permissions: write-all
|
||||
uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev
|
||||
with:
|
||||
tag1: PuerNya/sing-box
|
||||
|
||||
Reference in New Issue
Block a user