diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07314d31..21f2ab1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,11 +71,28 @@ jobs: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v4 + - uses: actions/create-github-app-token@v1 + id: app-token + name: Create GitHub App Token + with: + app-id: ${{ vars.CI_APP_ID }} + private-key: ${{ secrets.CI_APP_PRIVATE_KEY }} + + - uses: actions/checkout@v4 with: ref: main - token: ${{secrets.RELEASE_TOKEN}} + token: ${{steps.app-token.outputs.token}} + + - 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: Configure Git author + run: | + git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' + git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>' - name: extract website uses: actions/download-artifact@v4 @@ -84,8 +101,6 @@ jobs: - name: push website run: | - git config --global user.name "SmallRye CI" - git config --global user.email "smallrye@googlegroups.com" git status git diff git add -A . diff --git a/.github/workflows/demand.yml b/.github/workflows/demand.yml index d9b1b6af..11885571 100644 --- a/.github/workflows/demand.yml +++ b/.github/workflows/demand.yml @@ -52,11 +52,28 @@ jobs: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v4 + - uses: actions/create-github-app-token@v1 + id: app-token + name: Create GitHub App Token + with: + app-id: ${{ vars.CI_APP_ID }} + private-key: ${{ secrets.CI_APP_PRIVATE_KEY }} + + - uses: actions/checkout@v4 with: ref: main - token: ${{secrets.RELEASE_TOKEN}} + token: ${{steps.app-token.outputs.token}} + + - 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: Configure Git author + run: | + git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' + git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>' - name: extract website uses: actions/download-artifact@v4 @@ -65,8 +82,6 @@ jobs: - name: push website run: | - git config --global user.name "SmallRye CI" - git config --global user.email "smallrye@googlegroups.com" git status git diff git add -A .