Skip to content

Commit 89e1ee9

Browse files
ci: Update doc.yml (#56)
When server version is build update the readMe through PR and run test with latest version server
1 parent eef6fd6 commit 89e1ee9

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/doc.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,16 @@ jobs:
2828
git config --global user.email "actions@github.com"
2929
git status
3030
BRANCH_NAME=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
31-
echo "Running on branch: '$BRANCH_NAME'"
32-
if [[ "$BRANCH_NAME" = "main" ]]; then
33-
git pull --rebase origin main
34-
cat data.json
35-
mustache data.json template.mustache > README_new.md
36-
mv README_new.md README.md
37-
rm -rf data.json
38-
echo "There are changes in 'main'. Update README"
39-
git add README.md
40-
git commit -m "Update README with latest commit ID - ${{ github.event.client_payload.version }}"
41-
git push -u origin main
42-
43-
fi
31+
git pull --rebase origin main
32+
git checkout -b run-test-upstream-${{ github.event.client_payload.version }}
33+
git pull --rebase origin main
34+
cat data.json
35+
mustache data.json template.mustache > README_new.md
36+
mv README_new.md README.md
37+
rm -rf data.json
38+
git add README.md
39+
git commit -m "Update README with latest commit ID - ${{ github.event.client_payload.version }}"
40+
git push -u origin run-test-upstream-${{ github.event.client_payload.version }}
41+
gh pr create --title "Update server version in ReadMe" --body "Test driver with latest server version"
4442
env:
4543
GITHUB_TOKEN: ${{ secrets.UPDATE_TOKEN }}

0 commit comments

Comments
 (0)