mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 11:42:18 +08:00
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
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'
|
|
}
|
|
});
|