Skip to content

Commit 42c31c0

Browse files
ci: Use otelbot token for releases (#1598)
This is an attempt to get the CI to run automatically on release PRs.
1 parent 2ceaf46 commit 42c31c0

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,23 @@ jobs:
2121
uses: ruby/[email protected]
2222
with:
2323
ruby-version: ${{ env.ruby_version }}
24+
2425
- name: Checkout repo
2526
uses: actions/checkout@v4
27+
2628
- name: Install Toys
2729
run: "gem install --no-document toys -v 0.15.5"
30+
31+
- name: Create otelbot token
32+
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
33+
id: otelbot-token
34+
with:
35+
app-id: ${{ vars.OTELBOT_APP_ID }}
36+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
37+
2838
- name: Open release pull request
2939
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
3141
run: |
3242
toys release request --yes --verbose \
3343
"--release-ref=${{ github.ref }}" \

.github/workflows/release-request.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,23 @@ jobs:
2525
uses: ruby/[email protected]
2626
with:
2727
ruby-version: ${{ env.ruby_version }}
28+
2829
- name: Checkout repo
2930
uses: actions/checkout@v4
31+
3032
- name: Install Toys
3133
run: "gem install --no-document toys -v 0.15.5"
34+
35+
- name: Create otelbot token
36+
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
37+
id: otelbot-token
38+
with:
39+
app-id: ${{ vars.OTELBOT_APP_ID }}
40+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
41+
3242
- name: Open release pull request
3343
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
3545
run: |
3646
toys release request --yes --verbose \
3747
"--gems=${{ github.event.inputs.gems }}" \

.github/workflows/release-retry.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,23 @@ jobs:
2828
uses: ruby/[email protected]
2929
with:
3030
ruby-version: ${{ env.ruby_version }}
31+
3132
- name: Checkout repo
3233
uses: actions/checkout@v4
34+
3335
- name: Install Toys
3436
run: "gem install --no-document toys -v 0.15.5"
37+
38+
- name: Create otelbot token
39+
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
40+
id: otelbot-token
41+
with:
42+
app-id: ${{ vars.OTELBOT_APP_ID }}
43+
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
44+
3545
- name: Retry release
3646
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
GITHUB_TOKEN: ${{ steps.otelbot-token.outputs.token }}
3848
run: |
3949
toys release retry --yes --verbose \
4050
"--enable-releases=${{ secrets.ENABLE_RELEASES }}" \

0 commit comments

Comments
 (0)