Trigger CI workflow with github.rest.actions
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -9,10 +9,6 @@ on:
|
||||
inputs:
|
||||
version:
|
||||
description: Synergy version number
|
||||
workflow_run:
|
||||
workflows: ["Create tag"]
|
||||
types:
|
||||
- completed
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
|
||||
11
.github/workflows/create-tag.yml
vendored
11
.github/workflows/create-tag.yml
vendored
@ -40,3 +40,14 @@ jobs:
|
||||
git tag ${{ steps.next-version.outputs.next-version }}
|
||||
git push origin ${{ steps.next-version.outputs.next-version }}
|
||||
shell: bash
|
||||
|
||||
- name: Trigger CI workflow
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
workflow_id: 'ci.yml',
|
||||
ref: '${{ steps.next-version.outputs.next-version }}'
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user