Skip to content

Commit

Permalink
feat: add sync workflow (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
walidelnozahy authored Jul 29, 2024
1 parent 78bb3eb commit 3f1009f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Binary file added .github/.DS_Store
Binary file not shown.
42 changes: 42 additions & 0 deletions .github/workflows/trigger-sync-plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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' }}'
}
});

0 comments on commit 3f1009f

Please sign in to comment.