forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (31 loc) · 1.11 KB
/
rename-module.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Rename Go module
on:
push:
branches: [ libevm ]
pull_request: # DO NOT MERGE WITH ANYTHING OTHER THAN push
branches: [ libevm ]
workflow_dispatch:
jobs:
rename-module:
strategy:
matrix:
source_commit: ["2bd6bd01d2e8561dd7fc21b631f4a34ac16627a1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # everything
fetch-tags: true
- name: check out source commit
run: git checkout ${{ matrix.source_commit }}
- name: globally update module name
run: |
go mod edit -module github.com/ava-labs/go-ethereum;
find . -iname '*.go' | xargs sed -i -E \
's|^((import)?\s.*?"github\.com/)ethereum/go-ethereum|\1ava-labs/go-ethereum|';
- name: commit to "auto-rename-module-${{ matrix.source_commit }}" branch
uses: devops-infra/action-commit-push@8bc2ff9f9de7aa2a7581fc7e5b6401c04cab54c7
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
target_branch: "auto-rename-module-${{ matrix.source_commit }}"
force: true