diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2919bf2..bafa534 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,21 @@ jobs: permission-issues: write permission-pull-requests: write + - name: Resolve release bot identity + id: release-bot-identity + shell: bash + env: + GH_TOKEN: ${{ steps.release-bot.outputs.token }} + APP_SLUG: ${{ steps.release-bot.outputs.app-slug }} + run: | + set -euo pipefail + user_id="$(gh api "/users/${APP_SLUG}%5Bbot%5D" --jq .id)" + if [[ ! "$user_id" =~ ^[0-9]+$ ]]; then + echo "failed to resolve numeric bot user id for ${APP_SLUG}[bot]" >&2 + exit 1 + fi + echo "user_id=${user_id}" >> "$GITHUB_OUTPUT" + - name: Check out repository uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: @@ -104,6 +119,6 @@ jobs: GITHUB_TOKEN: ${{ steps.release-bot.outputs.token }} NPM_CONFIG_PROVENANCE: "true" GIT_AUTHOR_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot] - GIT_AUTHOR_EMAIL: 283001373+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com + GIT_AUTHOR_EMAIL: ${{ steps.release-bot-identity.outputs.user_id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com GIT_COMMITTER_NAME: ${{ steps.release-bot.outputs.app-slug }}[bot] - GIT_COMMITTER_EMAIL: 283001373+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com + GIT_COMMITTER_EMAIL: ${{ steps.release-bot-identity.outputs.user_id }}+${{ steps.release-bot.outputs.app-slug }}[bot]@users.noreply.github.com