Skip to content

Commit 8e15bba

Browse files
committed
Fix push command
1 parent 86f7660 commit 8e15bba

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/spec-update.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
steps:
5050
- name: "Checkout repository"
5151
uses: actions/checkout@v4
52+
with:
53+
token: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}
54+
5255
- name: "Checkout or Create Branch"
5356
id: branch
5457
run: |
@@ -62,9 +65,9 @@ jobs:
6265
6366
- name: "Download specification file"
6467
id: download
68+
env:
69+
GH_ENTERPRISE_TOKEN: ${{ secrets.GH_TOOLS_TOKEN }}
6570
run: |
66-
echo "${{ secrets.GH_TOOLS_TOKEN }}" | gh auth login --hostname github.tools.sap --with-token
67-
6871
case $CHOICE in
6972
core)
7073
API_URL="$API_BASE_URL/cloudsdk/cloud-sdk-java-tests/contents/aicore.yaml?ref=$REF"
@@ -115,10 +118,12 @@ jobs:
115118
git config --global user.name "SAP Cloud SDK Bot"
116119
git add .
117120
git commit -m "Update $CHOICE based on $REF"
118-
git push origin $BRANCH
121+
git push --set-upstream origin $BRANCH
119122
120123
- name: "Create pull request"
121124
if: ${{ env.CREATE_PR }}
125+
env:
126+
GH_TOKEN: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}
122127
run: |
123128
gh pr create --base main --head ${{ steps.push.outputs.branch }} --title "feat: [DevOps] Update $CHOICE Specification"
124129

0 commit comments

Comments
 (0)