Skip to content

Commit 98a8ac8

Browse files
authored
Use standard org secret OPENTELEMETRYBOT_GITHUB_TOKEN (#914)
1 parent 89bbca0 commit 98a8ac8

File tree

5 files changed

+6
-125
lines changed

5 files changed

+6
-125
lines changed

.github/workflows/backport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
env:
2929
NUMBER: ${{ github.event.inputs.number }}
3030
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
31-
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
31+
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
3232
run: |
3333
commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid)
3434
title=$(gh pr view $NUMBER --json title --jq .title)

.github/workflows/prepare-patch-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Create pull request
4646
env:
4747
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
48-
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
48+
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
4949
run: |
5050
message="Prepare release $VERSION"
5151
branch="opentelemetrybot/prepare-release-${VERSION}"

.github/workflows/prepare-release-branch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: Create pull request against the release branch
5858
env:
5959
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
60-
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
60+
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
6161
run: |
6262
message="Prepare release $VERSION"
6363
branch="opentelemetrybot/prepare-release-${VERSION}"
@@ -106,7 +106,7 @@ jobs:
106106
- name: Create pull request against main
107107
env:
108108
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
109-
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
109+
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
110110
run: |
111111
message="Update version to $NEXT_VERSION"
112112
body="Update version to \`$NEXT_VERSION\`."

.github/workflows/release.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
- integration-test
5757
outputs:
5858
version: ${{ steps.create-github-release.outputs.version }}
59-
jmx-metrics-version: ${{ steps.create-github-release.outputs.jmx-metrics-version }}
6059
steps:
6160
- run: |
6261
if [[ $GITHUB_REF_NAME != release/* ]]; then
@@ -173,8 +172,7 @@ jobs:
173172
env:
174173
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
175174
run: |
176-
jmx_metrics_version=$VERSION-alpha
177-
cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$jmx_metrics_version.jar opentelemetry-jmx-metrics.jar
175+
cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar opentelemetry-jmx-metrics.jar
178176
gh release create --target $GITHUB_REF_NAME \
179177
--title "Version $VERSION" \
180178
--notes-file /tmp/release-notes.txt \
@@ -183,7 +181,6 @@ jobs:
183181
opentelemetry-jmx-metrics.jar
184182
185183
echo "version=$VERSION" >> $GITHUB_OUTPUT
186-
echo "jmx-metrics-version=$jmx_metrics_version" >> $GITHUB_OUTPUT
187184
188185
merge-change-log-to-main:
189186
runs-on: ubuntu-latest
@@ -218,7 +215,7 @@ jobs:
218215
env:
219216
VERSION: ${{ needs.release.outputs.version }}
220217
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
221-
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
218+
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
222219
run: |
223220
if git diff --quiet; then
224221
if [[ $VERSION == *.0 ]]; then
@@ -240,12 +237,3 @@ jobs:
240237
gh pr create --title "$message" \
241238
--body "$body" \
242239
--base main
243-
244-
create-collector-contrib-pull-request:
245-
needs:
246-
- release
247-
uses: ./.github/workflows/reusable-create-collector-contrib-pull-request.yml
248-
with:
249-
jmx-metrics-version: ${{ needs.release.outputs.jmx-metrics-version }}
250-
secrets:
251-
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}

.github/workflows/reusable-create-collector-contrib-pull-request.yml

Lines changed: 0 additions & 107 deletions
This file was deleted.

0 commit comments

Comments
 (0)