|
21 | 21 | pull-requests: write # for adding label and assignee to PR |
22 | 22 |
|
23 | 23 | steps: |
| 24 | + - uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0 |
| 25 | + id: otelbot-token |
| 26 | + with: |
| 27 | + app-id: ${{ secrets.OTELBOT_JAVA_INSTRUMENTATION_APP_ID }} |
| 28 | + private-key: ${{ secrets.OTELBOT_JAVA_INSTRUMENTATION_PRIVATE_KEY }} |
| 29 | + |
24 | 30 | - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 |
| 31 | + with: |
| 32 | + token: ${{ steps.otelbot-token.outputs.token }} |
25 | 33 |
|
26 | 34 | - name: Free disk space |
27 | 35 | run: .github/scripts/gha-free-disk-space.sh |
@@ -55,27 +63,16 @@ jobs: |
55 | 63 | if: steps.diffcheck.outputs.has_diff == 'true' |
56 | 64 | run: .github/scripts/use-cla-approved-bot.sh |
57 | 65 |
|
58 | | - - uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0 |
59 | | - if: steps.diffcheck.outputs.has_diff == 'true' |
60 | | - id: otelbot-token |
61 | | - with: |
62 | | - app-id: ${{ vars.OTELBOT_APP_ID }} |
63 | | - private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }} |
64 | | - |
65 | 66 | - name: Find or create metadata update branch |
66 | 67 | if: steps.diffcheck.outputs.has_diff == 'true' |
67 | 68 | id: findbranch |
68 | | - env: |
69 | | - GH_TOKEN: ${{ steps.otelbot-token.outputs.token }} |
70 | 69 | run: | |
71 | 70 | BRANCH_NAME="otelbot/metadata-update-main" |
72 | 71 | echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT |
73 | 72 | git checkout -B "$BRANCH_NAME" |
74 | 73 |
|
75 | 74 | - name: Commit and push changes |
76 | 75 | if: steps.diffcheck.outputs.has_diff == 'true' |
77 | | - env: |
78 | | - GH_TOKEN: ${{ steps.otelbot-token.outputs.token }} |
79 | 76 | run: | |
80 | 77 | BRANCH_NAME="${{ steps.findbranch.outputs.branch }}" |
81 | 78 | git commit -m "chore: update instrumentation list [automated]" || echo "No changes to commit." |
@@ -104,7 +101,7 @@ jobs: |
104 | 101 | - name: Add label to PR |
105 | 102 | if: steps.createpr.outputs.new_pr == 'true' |
106 | 103 | env: |
107 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 104 | + GH_TOKEN: ${{ steps.otelbot-token.outputs.token }} |
108 | 105 | run: | |
109 | 106 | BRANCH_NAME="${{ steps.findbranch.outputs.branch }}" |
110 | 107 | PR_URL=$(gh pr list --state open --head "$BRANCH_NAME" --json url -q '.[0].url') |
|
0 commit comments