forked from empathyco/x
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.41 KB
/
edocs-dynamic-sync.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
name: EPDocs - Dynamic Content PR creation
on: [workflow_dispatch]
jobs:
connect-with-edocs:
runs-on: ubuntu-latest
steps:
# Use GitHub App token as a workaround to allow bypassing branch-protection rules
# https://github.com/orgs/community/discussions/13836#discussioncomment-8535364
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.GH_TOKENS_APP_ID }}
private-key: ${{ secrets.GH_TOKENS_APP_PRIVATE_KEY }}
- name: Checkout X mono-repo
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
- name: Get X Components Version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
with:
path: packages/x-components
- name: Get branch name
uses: nelonoel/[email protected]
- name: Trigger eDocs repository action
run: |
curl --request POST \
-u empathyco:${GITHUB_TOKEN} \
--header 'content-type: application/json' \
--url https://api.github.com/repos/empathyco/docs-framework/actions/workflows/93444504/dispatches \
--data '{"ref": "main", "inputs": {"branchName": "${{ env.BRANCH_NAME }}", "version": "${{ steps.package-version.outputs.current-version }}"}}'
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}