Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use standard org secret OPENTELEMETRYBOT_GITHUB_TOKEN #914

Merged
merged 2 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
NUMBER: ${{ github.event.inputs.number }}
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
run: |
commit=$(gh pr view $NUMBER --json mergeCommit --jq .mergeCommit.oid)
title=$(gh pr view $NUMBER --json title --jq .title)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Create pull request
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
run: |
message="Prepare release $VERSION"
branch="opentelemetrybot/prepare-release-${VERSION}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prepare-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Create pull request against the release branch
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
run: |
message="Prepare release $VERSION"
branch="opentelemetrybot/prepare-release-${VERSION}"
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- name: Create pull request against main
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
run: |
message="Update version to $NEXT_VERSION"
body="Update version to \`$NEXT_VERSION\`."
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:
- integration-test
outputs:
version: ${{ steps.create-github-release.outputs.version }}
jmx-metrics-version: ${{ steps.create-github-release.outputs.jmx-metrics-version }}
steps:
- run: |
if [[ $GITHUB_REF_NAME != release/* ]]; then
Expand Down Expand Up @@ -173,8 +172,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
jmx_metrics_version=$VERSION-alpha
cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$jmx_metrics_version.jar opentelemetry-jmx-metrics.jar
cp jmx-metrics/build/libs/opentelemetry-jmx-metrics-$VERSION-alpha.jar opentelemetry-jmx-metrics.jar
gh release create --target $GITHUB_REF_NAME \
--title "Version $VERSION" \
--notes-file /tmp/release-notes.txt \
Expand All @@ -183,7 +181,6 @@ jobs:
opentelemetry-jmx-metrics.jar
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "jmx-metrics-version=$jmx_metrics_version" >> $GITHUB_OUTPUT
merge-change-log-to-main:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -218,7 +215,7 @@ jobs:
env:
VERSION: ${{ needs.release.outputs.version }}
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
run: |
if git diff --quiet; then
if [[ $VERSION == *.0 ]]; then
Expand All @@ -240,12 +237,3 @@ jobs:
gh pr create --title "$message" \
--body "$body" \
--base main
create-collector-contrib-pull-request:
needs:
- release
uses: ./.github/workflows/reusable-create-collector-contrib-pull-request.yml
with:
jmx-metrics-version: ${{ needs.release.outputs.jmx-metrics-version }}
secrets:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
107 changes: 0 additions & 107 deletions .github/workflows/reusable-create-collector-contrib-pull-request.yml

This file was deleted.