From d874f95f2ad6142858f2e95592e026a232bf7cd5 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 13 Aug 2025 13:18:46 +0300 Subject: [PATCH] workflow: get github app user id --- .github/workflows/definitions-update.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/definitions-update.yml b/.github/workflows/definitions-update.yml index 9cc159161..ccd3c80f6 100644 --- a/.github/workflows/definitions-update.yml +++ b/.github/workflows/definitions-update.yml @@ -26,7 +26,12 @@ jobs: with: app-id: "${{ secrets.BOT_APP_ID }}" private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" - owner: "${{ github.repository_owner }}" + + - name: Get GitHub App User ID + id: get-user-id + run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} - name: Checkout uses: actions/checkout@v5 @@ -49,8 +54,8 @@ jobs: - name: Commit Changes if: github.event_name != 'pull_request' run: | - git config user.name jackett-bot - git config user.email jackett-bot@users.noreply.github.com + git config user.name '${{ steps.app-token.outputs.app-slug }}[bot]' + git config user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com' git add src/Jackett.Common/Definitions/rudub.yml