name: core_auto_update 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' } });