-
Notifications
You must be signed in to change notification settings - Fork 328
42 lines (38 loc) · 1.07 KB
/
trigger-sync-plugins.yml
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
32
33
34
35
36
37
38
39
40
41
42
name: Trigger Sync Plugins
on:
push:
branches:
- v4
paths:
- 'plugins.json'
workflow_dispatch:
inputs:
stage:
description: 'Deployment stage'
required: true
default: 'dev'
type: choice
options:
- dev
- prod
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Trigger Sync Docs Workflow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.CI_BOT_GITHUB_TOKEN }}
script: |
console.log(`Triggering sync-plguins workflow for stage: ${{ github.event.inputs.stage || 'dev' }}`);
await github.rest.actions.createWorkflowDispatch({
owner: 'serverlessinc',
repo: 'growth',
workflow_id: 'sync-plugins.yml', // Replace with the actual workflow file name in the target repo
ref: 'main',
inputs: {
stage: '${{ github.event.inputs.stage || 'dev' }}'
}
});