Publish Knowledge Base Article fixedcontenteditor-drawtext-extended-latin-characters-pdf e65eabe43be94cf996c6f9306a6f4d7d #121
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Knowledge Base Article | |
| on: | |
| repository_dispatch: | |
| types: [publish-kb] | |
| run-name: Publish Knowledge Base Article ${{ github.event.client_payload.name }} ${{ github.event.client_payload.id }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: '${{ github.workflow }} ${{ github.event.client_payload.id }}' | |
| cancel-in-progress: true | |
| jobs: | |
| publish_kb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: configure git | |
| run: | | |
| git config --global user.email "kb-bot@telerik.com" | |
| git config --global user.name "KB Bot" | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Create branch | |
| run: | | |
| git checkout -b "new-kb-$name-$id" | |
| cd $folder | |
| echo "$content" > "$name.md" | |
| git add "$name.md" | |
| git commit -m "Added new kb article $name" | |
| git push -u origin "new-kb-$name-$id" | |
| env: | |
| name: ${{ github.event.client_payload.name }} | |
| content: ${{ github.event.client_payload.content }} | |
| folder: ${{ github.event.client_payload.folder }} | |
| id: ${{ github.event.client_payload.id }} | |
| - name: Create pull request | |
| run: gh pr create --fill | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |