Skip to content

Commit 9cd73dc

Browse files
ci: Update release workflows to use otelbot (#1924)
Using a bot token will allow us to have CI workflows run automatically when a release PR opens. The current setup requires us to add a commit to get the PR to run. This aligns the core repo with contrib. Also, update the release author to be the new bot.
1 parent 23c5aaf commit 9cd73dc

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,16 @@ jobs:
2525
uses: actions/checkout@v4
2626
- name: Install Toys
2727
run: "gem install --no-document toys -v 0.15.5"
28+
- name: Create otelbot app token
29+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
30+
id: app-token
31+
with:
32+
app-id: ${{ vars.OTELBOT_RUBY_APP_ID }}
33+
private-key: ${{ secrets.OTELBOT_RUBY_PRIVATE_KEY }}
2834
- name: Open release pull request
2935
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
# Use an app token instead of GITHUB_TOKEN to trigger workflows
37+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
3138
run: |
3239
toys release request --yes --verbose \
3340
"--release-ref=${{ github.ref }}" \

.github/workflows/release-request.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@ jobs:
2929
uses: actions/checkout@v2
3030
- name: Install Toys
3131
run: "gem install --no-document toys -v 0.15.5"
32+
- name: Create otelbot app token
33+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
34+
id: app-token
35+
with:
36+
app-id: ${{ vars.OTELBOT_RUBY_APP_ID }}
37+
private-key: ${{ secrets.OTELBOT_RUBY_PRIVATE_KEY }}
3238
- name: Open release pull request
3339
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
# Use an app token instead of GITHUB_TOKEN to trigger workflows
41+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
3542
run: |
3643
toys release request --yes --verbose \
3744
"--gems=${{ github.event.inputs.gems }}" \

.toys/.data/releases.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ main_branch: main
77
# Time in seconds for release scripts to wait for CI to complete.
88
required_checks_timeout: 1200
99
# Git user attached to commits for release pull requests.
10-
git_user_name: OpenTelemetry Bot
11-
git_user_email: 107717825+opentelemetrybot@users.noreply.github.com
10+
git_user_name: otelbot
11+
git_user_email: 197425009+otelbot@users.noreply.github.com
1212
# Toys tool that builds YARD reference docs
1313
docs_builder_tool: [yardoc]
1414

0 commit comments

Comments
 (0)