ci: auto trigger jan docs ci for new release (#3734)

Co-authored-by: Hien To <tominhhien97@gmail.com>
This commit is contained in:
hiento09 2024-09-26 15:45:39 +07:00 committed by GitHub
parent 143f2f5c58
commit cf0a232001
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,25 @@
name: Trigger Docs Workflow
on:
release:
types:
- published
workflow_dispatch:
push:
branches:
- ci/auto-trigger-jan-docs-for-new-release
jobs:
trigger_docs_workflow:
runs-on: ubuntu-latest
steps:
- name: Trigger external workflow using GitHub API
env:
GITHUB_TOKEN: ${{ secrets.PAT_SERVICE_ACCOUNT }}
run: |
curl -X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/janhq/docs/actions/workflows/jan-docs.yml/dispatches \
-d '{"ref":"main"}'