Skip to content

Commit

Permalink
Update publish-kb.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvetko committed Dec 7, 2023
1 parent f95a103 commit f3f34e9
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/publish-kb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@ jobs:
publish_kb:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: configure git
run: |
git config --global user.email "kb-bot@telerik.com"
git config --global user.name "KB Bot"
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-$($env:name)-$($env:id)"
cd $env:folder
echo $env:content > "$($env:name).md"
git add "$($env:name).md"
git commit -m "Added new kb article $($env:name)"
git push -u origin "new-kb-$($env:name)-$($env:id)"
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 }}
Expand All @@ -41,4 +42,4 @@ jobs:
- name: Create pull request
run: gh pr create --fill
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit f3f34e9

Please sign in to comment.