Trigger CI workflow with github.rest.actions

This commit is contained in:
Nick Bolton
2024-09-04 18:18:26 +01:00
parent 963980b392
commit e4ed4a2f26
2 changed files with 11 additions and 4 deletions

View File

@ -9,10 +9,6 @@ on:
inputs:
version:
description: Synergy version number
workflow_run:
workflows: ["Create tag"]
types:
- completed
pull_request:
types:
- opened

View File

@ -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 }}'
});