Skip to content

fix: fix trigger steps in edocs-dynamic-sync.yml #59

fix: fix trigger steps in edocs-dynamic-sync.yml

fix: fix trigger steps in edocs-dynamic-sync.yml #59

name: EPDocs - Dynamic Content PR creation
on: [workflow_dispatch, pull_request]
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@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1
id: app-token
with:
app-id: ${{ vars.GH_TOKENS_APP_ID }}
private-key: ${{ secrets.GH_TOKENS_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
docs-framework
x
- name: Checkout X mono-repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 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/branch-name@1ea5c86cb559a8c4e623da7f188496208232e49f # v1.0.1
- name: Trigger eDocs repository action
run: |
curl -v -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ steps.app-token.outputs.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/empathyco/docs-framework/actions/workflows/epdocs-sync-dynamic-x-docs.yml/dispatches \
-d '{"ref": "main", "inputs": {"branchName": "main", "version": "${{ steps.package-version.outputs.current-version }}"}}'