diff --git a/.github/actions/commit-changes/action.yml b/.github/actions/commit-changes/action.yml index f210730ce..80007c5b7 100644 --- a/.github/actions/commit-changes/action.yml +++ b/.github/actions/commit-changes/action.yml @@ -1,5 +1,5 @@ name: 'Commit Changes' -description: 'Commit changes to the repository' +description: 'Commit changes to the repository. Note: git user.name and user.email must be configured before calling this action.' inputs: message: description: 'The message to commit' @@ -7,12 +7,6 @@ inputs: runs: using: 'composite' steps: - - name: configure-git - shell: bash - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' - - name: commit-changes shell: bash run: | diff --git a/.github/workflows/check-warp-deploy.yaml b/.github/workflows/check-warp-deploy.yaml index 69c14516f..1e285e884 100644 --- a/.github/workflows/check-warp-deploy.yaml +++ b/.github/workflows/check-warp-deploy.yaml @@ -9,18 +9,27 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: + - name: Generate GitHub App Token + id: generate-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.HYPER_GONK_APP_ID }} + private-key: ${{ secrets.HYPER_GONK_PRIVATE_KEY }} + - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 + - name: Determine Base & Head SHA id: determine-base-sha run: | echo "base_sha=${{ github.event.pull_request.base.sha }}" >> $GITHUB_OUTPUT echo "current_sha=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT + - name: Check Warp Deploy env: PR_NUMBER: ${{ github.event.pull_request.number }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} run: | ./scripts/check-warp-deploy.sh ${{ steps.determine-base-sha.outputs.base_sha }} ${{ steps.determine-base-sha.outputs.current_sha }} diff --git a/.github/workflows/combine.yml b/.github/workflows/combine.yml index cfcceacf8..dc5297835 100644 --- a/.github/workflows/combine.yml +++ b/.github/workflows/combine.yml @@ -30,6 +30,11 @@ jobs: - name: foundry-install uses: foundry-rs/foundry-toolchain@v1 + - name: Configure Git for Hyper Gonk + run: | + git config user.name "${{ steps.generate-token.outputs.app-slug }}[bot]" + git config user.email "${{ secrets.HYPER_GONK_APP_ID }}+${{ steps.generate-token.outputs.app-slug }}[bot]@users.noreply.github.com" + - name: combine-data run: | echo "Assembling warp route configs, chain metadata and addresses together..." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03983fac0..fdb8616a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,12 +36,18 @@ jobs: app-id: ${{ secrets.HYPER_GONK_APP_ID }} private-key: ${{ secrets.HYPER_GONK_PRIVATE_KEY }} + - name: Configure Git for Hyper Gonk + run: | + git config user.name "${{ steps.generate-token.outputs.app-slug }}[bot]" + git config user.email "${{ secrets.HYPER_GONK_APP_ID }}+${{ steps.generate-token.outputs.app-slug }}[bot]@users.noreply.github.com" + - name: Create Release PR or Publish to NPM id: changesets uses: changesets/action@v1 with: version: yarn version:prepare publish: yarn release + setupGitUser: false env: NPM_CONFIG_PROVENANCE: true GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/update-hyperlane-deps.yml b/.github/workflows/update-hyperlane-deps.yml index 63ed74fb8..ca7ca1475 100644 --- a/.github/workflows/update-hyperlane-deps.yml +++ b/.github/workflows/update-hyperlane-deps.yml @@ -29,8 +29,8 @@ jobs: - name: Configure Git run: | - git config user.name "GitHub Actions Bot" - git config user.email "github-actions[bot]@users.noreply.github.com" + git config user.name "${{ steps.generate-token.outputs.app-slug }}[bot]" + git config user.email "${{ secrets.HYPER_GONK_APP_ID }}+${{ steps.generate-token.outputs.app-slug }}[bot]@users.noreply.github.com" - name: Setup Node.js 20 uses: actions/setup-node@v4