From 3e599401ff22ecc812b41b971a23e9c36b533e86 Mon Sep 17 00:00:00 2001 From: Arran Schlosberg Date: Tue, 15 Oct 2024 22:30:29 +0100 Subject: [PATCH] feat: signed commit when renaming upstream module --- .github/workflows/rename-module.yml | 42 ++++++++++++++++------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/workflows/rename-module.yml b/.github/workflows/rename-module.yml index b2ccc20714b4..dcb24c0a2347 100644 --- a/.github/workflows/rename-module.yml +++ b/.github/workflows/rename-module.yml @@ -44,29 +44,35 @@ jobs: xargs grep -In github.com/ethereum/go-ethereum | \ grep -v "https://github.com/ethereum/go-ethereum" - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: 1.21.4 + # - name: Set up Go + # uses: actions/setup-go@v5 + # with: + # go-version: 1.21.4 + + # - name: Smoke tests + # # `go list` shows us the module name and grep will non-zero exit on mismatch + # # `go build` is a rudimentary but broad test of correctness + # # The explicitly tested packages are edge cases: + # # - bind generates tests and a go.mod on the fly + # # - rlpgen has testdata with imports that need updating + # run: | + # go list . | grep ava-labs/libevm; + # go build ./...; + # go test ./accounts/abi/bind ./rlp/rlpgen - - name: Smoke tests - # `go list` shows us the module name and grep will non-zero exit on mismatch - # `go build` is a rudimentary but broad test of correctness - # The explicitly tested packages are edge cases: - # - bind generates tests and a go.mod on the fly - # - rlpgen has testdata with imports that need updating + - name: Create new branch run: | - go list . | grep ava-labs/libevm; - go build ./...; - go test ./accounts/abi/bind ./rlp/rlpgen + git checkout -b "${{ env.output_branch }}"; + git push origin "${{ env.output_branch }}"; - name: Commit to new branch - uses: devops-infra/action-commit-push@8bc2ff9f9de7aa2a7581fc7e5b6401c04cab54c7 + uses: planetscale/ghcommit-action@v0.2.0 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: - github_token: ${{ secrets.GITHUB_TOKEN }} - target_branch: ${{ env.output_branch }} - force: true - commit_prefix: "[AUTO] rename Go module + update internal import paths" + commit_message: "[AUTO] rename Go module + update internal import paths" + repo: ${{ github.repository }} + branch: ${{ env.output_branch }} - name: Open PR to "renamed-go-module" iff workflow dispatched on "main" # If we are changing the way in which we manage module renaming then it