From c057781314032ddf73a27721a1991ef0d359d302 Mon Sep 17 00:00:00 2001 From: juewuy Date: Sat, 23 Mar 2024 15:20:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E6=B7=BB=E5=8A=A0=20=20=20=20=20=20?= =?UTF-8?q?=20=20.github/workflows/core=5Fauto=5Fupdate.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/core_auto_update.yml | 42 +++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/core_auto_update.yml b/.github/workflows/core_auto_update.yml index a027c7c..b8d13ab 100644 --- a/.github/workflows/core_auto_update.yml +++ b/.github/workflows/core_auto_update.yml @@ -1,31 +1,31 @@ name: core_auto_update on: -# release: -# types: [published] -# push: -# tags: -# - 'v*' -# branches: -# - master schedule: - cron: 0 18 * * * -# watch: -# types: [started] workflow_dispatch: - + jobs: update_singboxp: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Auto update singbox_core_PuerNya to prerelease - uses: ./.github/workflows/update_singbox_core.yaml - 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 + - name: Auto update singbox_core_PuerNya to prerelease + uses: actions/github-script@v7 + with: + script: | + const { data: { id } } = await octokit.request('GET /repos/{owner}/{repo}/actions/workflows', { + owner: context.repo.owner, + repo: context.repo.repo + }); + await octokit.request('POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches', { + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'update_singbox_core.yaml', + 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' + } + });