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