From 381d905ed9d77ab9f42d1b5c4bce176d0af0cb9a Mon Sep 17 00:00:00 2001 From: juewuy Date: Sat, 23 Mar 2024 15:39:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E4=BF=AE=E6=94=B9=20=20=20=20=20=20?= =?UTF-8?q?=20=20.github/workflows/core=5Fauto=5Fupdate.yml=20=E5=B7=B2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=20=20=20=20=20=20=20.github/workflows/upd?= =?UTF-8?q?ate=5Fsingbox=5Fcore.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/core_auto_update.yml | 42 +++++----------------- .github/workflows/update_singbox_core.yaml | 18 ++++++++++ 2 files changed, 27 insertions(+), 33 deletions(-) diff --git a/.github/workflows/core_auto_update.yml b/.github/workflows/core_auto_update.yml index f03a364..3f8fc42 100644 --- a/.github/workflows/core_auto_update.yml +++ b/.github/workflows/core_auto_update.yml @@ -4,40 +4,16 @@ on: schedule: - cron: 0 18 * * * workflow_dispatch: - + jobs: update_singboxp: runs-on: ubuntu-latest steps: - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '14' - - - name: Auto update singbox_core_PuerNya to prerelease - uses: actions/github-script@v7 - with: - script: | - const { GitHub } = require('@actions/github'); - const github = new GitHub(process.env.GITHUB_TOKEN); - - const { data: { workflows } } = await github.actions.listRepoWorkflows({ - owner: context.repo.owner, - repo: context.repo.repo - }); - - const targetWorkflow = workflows.find(workflow => workflow.name === 'update_singbox_core'); - const workflowID = targetWorkflow.id; - - await github.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: context.repo.repo, - workflow_id: workflowID, - ref: 'dev', - inputs: { - tag1: 'PuerNya/sing-box', - tag2: 'building', - tag3: 'singbox_core_PuerNya', - tag5: 'with_quic,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_gvisor' - } - }); + - name: Auto update singbox_core_PuerNya to prerelease + uses: juewuy/ShellCrash/.github/workflows/update_singbox_core.yaml@dev + with: + tag1: PuerNya/sing-box + tag2: building + tag3: singbox_core_PuerNya + tag5: with_quic,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_gvisor + \ No newline at end of file diff --git a/.github/workflows/update_singbox_core.yaml b/.github/workflows/update_singbox_core.yaml index 30f820c..ce3e4f7 100644 --- a/.github/workflows/update_singbox_core.yaml +++ b/.github/workflows/update_singbox_core.yaml @@ -23,6 +23,24 @@ on: description: 'build tags' required: false type: string + workflow_call: + inputs: + tag1: + required: true + type: string + tag2: + required: true + type: string + tag3: + required: false + type: string + tag4: + required: false + type: string + tag5: + required: false + type: string + jobs: go: runs-on: ubuntu-latest