From f3f34e91b7988bd9dafa6e4219be82a01beef513 Mon Sep 17 00:00:00 2001 From: Tsvetko Hadzhitsenev Date: Thu, 7 Dec 2023 15:58:03 +0200 Subject: [PATCH] Update publish-kb.yml --- .github/workflows/publish-kb.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-kb.yml b/.github/workflows/publish-kb.yml index 61f738c7..fa74c259 100644 --- a/.github/workflows/publish-kb.yml +++ b/.github/workflows/publish-kb.yml @@ -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 }} @@ -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 }} \ No newline at end of file