已修改 .github/workflows/core_auto_update.yml

已修改        .github/workflows/update_singbox_core.yaml
This commit is contained in:
juewuy 2024-03-23 15:39:35 +08:00
parent 575f1d5d4b
commit 381d905ed9
2 changed files with 27 additions and 33 deletions

View File

@ -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

View File

@ -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