@@ -99,14 +99,20 @@ jobs:
9999 - name : Use CLA approved github bot
100100 run : .github/scripts/use-cla-approved-github-bot.sh
101101
102+ - uses : actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
103+ id : otelbot-token
104+ with :
105+ app-id : ${{ vars.OTELBOT_APP_ID }}
106+ private-key : ${{ secrets.OTELBOT_PRIVATE_KEY }}
107+
102108 - name : Create pull request against the release branch
103109 id : create_release_branch_pr
104110 env :
105111 # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
106- GITHUB_TOKEN : ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
112+ GITHUB_TOKEN : ${{ steps.otelbot-token.outputs.token }}
107113 run : |
108114 message="Prepare release ${STABLE_VERSION}/${UNSTABLE_VERSION}"
109- branch="opentelemetrybot /prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}"
115+ branch="otelbot /prepare-release-${STABLE_VERSION}-${UNSTABLE_VERSION}"
110116
111117 git commit -a -m "$message"
112118 git push origin HEAD:$branch
@@ -196,15 +202,21 @@ jobs:
196202 - name : Use CLA approved github bot
197203 run : .github/scripts/use-cla-approved-github-bot.sh
198204
205+ - uses : actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
206+ id : otelbot-token-main
207+ with :
208+ app-id : ${{ vars.OTELBOT_APP_ID }}
209+ private-key : ${{ secrets.OTELBOT_PRIVATE_KEY }}
210+
199211 - name : Create pull request against main
200212 id : create_main_pr
201213 env :
202214 # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
203- GITHUB_TOKEN : ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
215+ GITHUB_TOKEN : ${{ steps.otelbot-token-main.outputs.token }}
204216 run : |
205217 message="Update version to ${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}"
206218 body="Update version to \`${STABLE_NEXT_VERSION}/${UNSTABLE_NEXT_VERSION}\`."
207- branch="opentelemetrybot /update-version-to-${STABLE_NEXT_VERSION}-${UNSTABLE_NEXT_VERSION}"
219+ branch="otelbot /update-version-to-${STABLE_NEXT_VERSION}-${UNSTABLE_NEXT_VERSION}"
208220
209221 git commit -a -m "$message"
210222 git push origin HEAD:$branch
0 commit comments