-
Notifications
You must be signed in to change notification settings - Fork 120
31 lines (30 loc) · 821 Bytes
/
Copy pathpush.yml
File metadata and controls
31 lines (30 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Push to subconverter
on:
push:
workflow_dispatch:
permissions:
contents: read
actions: write
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
# 自动取消其他运行中的workflow
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v7
- name: Push update to subconverter
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/github-script@v9
with:
github-token: ${{ env.GIT_TOKEN }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: 'subconverter',
workflow_id: 'submodule.yml',
ref: 'simpleweb',
});