From 3592c75ca141b8e0ec8f173f535c89e57f60d414 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 5 Dec 2025 19:48:05 -0800 Subject: [PATCH 1/2] Use otelbot-java-instrumentation for metadata update workflow --- .github/workflows/metadata-update.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/metadata-update.yml b/.github/workflows/metadata-update.yml index 24e96602522b..d246be3670fb 100644 --- a/.github/workflows/metadata-update.yml +++ b/.github/workflows/metadata-update.yml @@ -21,7 +21,15 @@ jobs: pull-requests: write # for adding label and assignee to PR steps: + - uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0 + id: otelbot-token + with: + app-id: ${{ secrets.OTELBOT_JAVA_INSTRUMENTATION_APP_ID }} + private-key: ${{ secrets.OTELBOT_JAVA_INSTRUMENTATION_PRIVATE_KEY }} + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + with: + token: ${{ steps.otelbot-token.outputs.token }} - name: Free disk space run: .github/scripts/gha-free-disk-space.sh @@ -55,13 +63,6 @@ jobs: if: steps.diffcheck.outputs.has_diff == 'true' run: .github/scripts/use-cla-approved-bot.sh - - uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0 - if: steps.diffcheck.outputs.has_diff == 'true' - id: otelbot-token - with: - app-id: ${{ vars.OTELBOT_APP_ID }} - private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} - - name: Find or create metadata update branch if: steps.diffcheck.outputs.has_diff == 'true' id: findbranch From 322b2b19a7efa56b3ad603e890aaf2acb046db0d Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Fri, 5 Dec 2025 19:54:39 -0800 Subject: [PATCH 2/2] remove unneeded --- .github/workflows/metadata-update.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/metadata-update.yml b/.github/workflows/metadata-update.yml index d246be3670fb..f44b0279f585 100644 --- a/.github/workflows/metadata-update.yml +++ b/.github/workflows/metadata-update.yml @@ -66,8 +66,6 @@ jobs: - name: Find or create metadata update branch if: steps.diffcheck.outputs.has_diff == 'true' id: findbranch - env: - GH_TOKEN: ${{ steps.otelbot-token.outputs.token }} run: | BRANCH_NAME="otelbot/metadata-update-main" echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT @@ -75,8 +73,6 @@ jobs: - name: Commit and push changes if: steps.diffcheck.outputs.has_diff == 'true' - env: - GH_TOKEN: ${{ steps.otelbot-token.outputs.token }} run: | BRANCH_NAME="${{ steps.findbranch.outputs.branch }}" git commit -m "chore: update instrumentation list [automated]" || echo "No changes to commit." @@ -105,7 +101,7 @@ jobs: - name: Add label to PR if: steps.createpr.outputs.new_pr == 'true' env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ steps.otelbot-token.outputs.token }} run: | BRANCH_NAME="${{ steps.findbranch.outputs.branch }}" PR_URL=$(gh pr list --state open --head "$BRANCH_NAME" --json url -q '.[0].url')