ShellCrash/.github/workflows/core_auto_update.yml

44 lines
1.4 KiB
YAML
Raw Normal View History

name: core_auto_update
on:
schedule:
- cron: 0 18 * * *
workflow_dispatch:
jobs:
update_singboxp:
runs-on: ubuntu-latest
steps:
2024-03-23 15:27:48 +08:00
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Auto update singbox_core_PuerNya to prerelease
2024-03-23 15:25:49 +08:00
uses: actions/github-script@v7
with:
script: |
2024-03-23 15:27:48 +08:00
const { GitHub } = require('@actions/github');
const github = new GitHub(process.env.GITHUB_TOKEN);
2024-03-23 15:25:49 +08:00
2024-03-23 15:27:48 +08:00
const { data: { workflows } } = await github.actions.listRepoWorkflows({
owner: context.repo.owner,
repo: context.repo.repo
});
2024-03-23 15:27:48 +08:00
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,
2024-03-23 15:27:48 +08:00
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'
}
});