From cf0a232001c918f87d6d8dba6fd18d0b0ce4e19a Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:45:39 +0700 Subject: [PATCH] ci: auto trigger jan docs ci for new release (#3734) Co-authored-by: Hien To --- .github/workflows/auto-trigger-jan-docs.yaml | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/auto-trigger-jan-docs.yaml diff --git a/.github/workflows/auto-trigger-jan-docs.yaml b/.github/workflows/auto-trigger-jan-docs.yaml new file mode 100644 index 000000000..a3001a9e0 --- /dev/null +++ b/.github/workflows/auto-trigger-jan-docs.yaml @@ -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"}'