-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Migrate uses of ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} to ${{ steps.otelbot-token.outputs.token }}
where you will need to add this step prior which sets up ${{ steps.otelbot-token.outputs.token }}
- uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}
Please add the above step DIRECTLY before the first step that uses its output.
Also migrate
git config user.name opentelemetrybot
git config user.email 107717825+opentelemetrybot@users.noreply.github.com
to
git config user.name otelbot
git config user.email 197425009+otelbot@users.noreply.github.com
Notes
If the OPENTELEMETRYBOT_GITHUB_TOKEN secret is being passed to a reusable workflow, you should update it to pass the OTELBOT_PRIVATE_KEY secret instead and then generate the token inside of the reusable workflow as above.
Since opentelemetrybot was a user, and otelbot is a github app, comparisons to user.login == opentelemetrybot need to be migrated to user.login == otelbot[bot] (with the trailing [bot] suffix).
Migrating workflows that use opentelemetrybot forks
If the workflow is using an opentelemetrybot fork to submit PRs,
then update the workflow to push to branch on the main repo and open PR from there instead
(because otelbot is a github app and so doesn't have any forks).
The branch name should start with "otelbot/".
Use secrets.GITHUB_TOKEN to push to the branch since otelbot app doesn't have permission to do that.
But open the PR using the otelbot app token since secrets.GITHUB_TOKEN doesn't trigger workflows.