Skip to content

Commit cd9772a

Browse files
ci(fix): Use OTelBot App Token (#1639)
Toys releases need app permissions for the token to update pull requests with labels. Removing the otelbot from release-retry since it doesn't create a PR.
1 parent 49a2982 commit cd9772a

File tree

3 files changed

+14
-20
lines changed

3 files changed

+14
-20
lines changed

.github/workflows/release-request-weekly.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ jobs:
2828
- name: Install Toys
2929
run: "gem install --no-document toys -v 0.15.5"
3030

31-
- name: Create otelbot token
32-
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
33-
id: otelbot-token
31+
- name: Create otelbot app token
32+
uses: actions/[email protected]
33+
id: app-token
3434
with:
35-
app-id: ${{ vars.OTELBOT_APP_ID }}
36-
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
35+
app-id: ${{ vars.OTELBOT_RUBY_CONTRIB_APP_ID }}
36+
private-key: ${{ secrets.OTELBOT_RUBY_CONTRIB_PRIVATE_KEY }}
3737

3838
- name: Open release pull request
3939
env:
40-
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
40+
# Using the app token instead of GITHUB_TOKEN to trigger workflows
41+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
4142
run: |
4243
toys release request --yes --verbose \
4344
"--release-ref=${{ github.ref }}" \

.github/workflows/release-request.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ jobs:
3232
- name: Install Toys
3333
run: "gem install --no-document toys -v 0.15.5"
3434

35-
- name: Create otelbot token
36-
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
37-
id: otelbot-token
35+
- name: Create otelbot app token
36+
uses: actions/[email protected]
37+
id: app-token
3838
with:
39-
app-id: ${{ vars.OTELBOT_APP_ID }}
40-
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
39+
app-id: ${{ vars.OTELBOT_RUBY_CONTRIB_APP_ID }}
40+
private-key: ${{ secrets.OTELBOT_RUBY_CONTRIB_PRIVATE_KEY }}
4141

4242
- name: Open release pull request
4343
env:
44-
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
44+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
4545
run: |
4646
toys release request --yes --verbose \
4747
"--gems=${{ github.event.inputs.gems }}" \

.github/workflows/release-retry.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,9 @@ jobs:
3535
- name: Install Toys
3636
run: "gem install --no-document toys -v 0.15.5"
3737

38-
- name: Create otelbot token
39-
uses: actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b # v2.1.1
40-
id: otelbot-token
41-
with:
42-
app-id: ${{ vars.OTELBOT_APP_ID }}
43-
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
44-
4538
- name: Retry release
4639
env:
47-
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4841
run: |
4942
toys release retry --yes --verbose \
5043
"--enable-releases=${{ secrets.ENABLE_RELEASES }}" \

0 commit comments

Comments
 (0)