diff --git a/.github/workflows/rename-module.yml b/.github/workflows/rename-module.yml index 00e1bcc17c67..5b6d39ffec43 100644 --- a/.github/workflows/rename-module.yml +++ b/.github/workflows/rename-module.yml @@ -9,10 +9,9 @@ on: jobs: rename-module: - strategy: - matrix: - source_commit: ["2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1"] runs-on: ubuntu-latest + env: + source_commit: 2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1 steps: - uses: actions/checkout@v4 with: @@ -20,7 +19,7 @@ jobs: fetch-tags: true - name: Check out source commit - run: git checkout ${{ matrix.source_commit }} + run: git checkout ${{ env.source_commit }} - name: Globally update module name run: | @@ -50,10 +49,19 @@ jobs: go build ./...; go test ./accounts/abi/bind ./rlp/rlpgen - - name: Commit to "auto-rename-module-${{ matrix.source_commit }}" branch + - name: Commit to "auto-rename-module-${{ env.source_commit }}" branch uses: devops-infra/action-commit-push@8bc2ff9f9de7aa2a7581fc7e5b6401c04cab54c7 with: github_token: ${{ secrets.GITHUB_TOKEN }} - target_branch: "auto-rename-module-${{ matrix.source_commit }}" + target_branch: "auto-rename-module-${{ env.source_commit }}" force: true commit_prefix: "[AUTO] rename Go module + update internal import paths" + + - name: Open PR to "renamed-go-module" + uses: devops-infra/action-pull-request@v0.5.5 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + source_branch: "auto-rename-module-${{ env.source_commit }}" + target_branch: renamed-go-module + title: "[AUTO] Rename upstream Go module at `${{ env.source_commit }}`" + body: "_PR generated by GitHub Action_"