1010 id-token : write
1111
1212 steps :
13+ - uses : actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
14+ id : app-token
15+ with :
16+ client-id : ${{ secrets.SAP_CLOUD_SDK_BOT_CLIENT_ID }}
17+ private-key : ${{ secrets.SAP_CLOUD_SDK_BOT_PRIVATE_KEY }}
18+ owner : SAP
19+ repositories : cloud-sdk
1320 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1421 with :
1522 ref : ' main'
@@ -30,23 +37,27 @@ jobs:
3037 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3138 with :
3239 repository : SAP/cloud-sdk
33- token : ${{ secrets.GH_DOCS_TOKEN }}
40+ token : ${{ steps.app-token.outputs.token }}
3441 fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository.
3542 path : ./cloud-sdk
3643 - name : Update release notes
3744 run : |
3845 npx ts-node -e "import { addCurrentChangelog } from './scripts/add-changelog'; addCurrentChangelog()"
3946 - name : Open PR
47+ env :
48+ BOT_EMAIL : ${{ vars.SAP_CLOUD_SDK_BOT_EMAIL }}
49+ BOT_NAME : ${{ vars.SAP_CLOUD_SDK_BOT_NAME }}
4050 run : |
51+
52+ git config user.email "$BOT_EMAIL"
53+ git config user.name "$BOT_NAME"
54+
4155 cd cloud-sdk
42- git config --local user.email "${{ secrets.GH_DOCS_EMAIL }}"
43- git config --local user.name "${{ secrets.GH_DOCS_USER }}"
56+
4457 git checkout -b "update-release-notes"
4558 git commit -m "update release notes" -a
4659 git push -u origin update-release-notes
4760
48- echo ${{ secrets.GH_DOCS_TOKEN }} | gh auth login --hostname github.com --with-token
49- gh config set prompt disabled
5061 PR_BODY="Auto-created by update release notes workflow."
5162 PR_TITLE="Update JS Release Notes"
5263 gh pr create --head "update-release-notes" --title "${PR_TITLE}" --body "${PR_BODY}"
0 commit comments