Build and test forked PRs properly (#1738)
* build forks on PRs properly
This commit is contained in:
parent
00cd07a3a6
commit
fcd307d902
2
.github/workflows/micro-examples.yml
vendored
2
.github/workflows/micro-examples.yml
vendored
@ -32,6 +32,6 @@ jobs:
|
||||
path: 'examples'
|
||||
|
||||
- name: Build all
|
||||
run: $GITHUB_WORKSPACE/go-micro/.github/workflows/scripts/build-all-examples.sh ${{ github.event.pull_request.head.sha }}
|
||||
run: $GITHUB_WORKSPACE/go-micro/.github/workflows/scripts/build-all-examples.sh ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.head.repo.full_name }}
|
||||
working-directory: examples
|
||||
|
2
.github/workflows/micro-main.yml
vendored
2
.github/workflows/micro-main.yml
vendored
@ -32,6 +32,6 @@ jobs:
|
||||
path: 'micro'
|
||||
|
||||
- name: Build all
|
||||
run: $GITHUB_WORKSPACE/go-micro/.github/workflows/scripts/build-micro.sh ${{ github.event.pull_request.head.sha }}
|
||||
run: $GITHUB_WORKSPACE/go-micro/.github/workflows/scripts/build-micro.sh ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.head.repo.full_name }}
|
||||
working-directory: micro
|
||||
|
@ -32,7 +32,7 @@ function check_dir {
|
||||
}
|
||||
failed_arr=()
|
||||
failed=0
|
||||
go mod edit -replace github.com/micro/go-micro/v2=github.com/micro/go-micro/v2@$1
|
||||
go mod edit -replace github.com/micro/go-micro/v2=github.com/$2/v2@$1
|
||||
check_dir . $1
|
||||
if [ $failed -gt 0 ]; then
|
||||
echo Some builds failed
|
||||
|
2
.github/workflows/scripts/build-micro.sh
vendored
2
.github/workflows/scripts/build-micro.sh
vendored
@ -2,7 +2,7 @@
|
||||
# set -x
|
||||
|
||||
failed=0
|
||||
go mod edit -replace github.com/micro/go-micro/v2=github.com/micro/go-micro/v2@$1
|
||||
go mod edit -replace github.com/micro/go-micro/v2=github.com/$2/v2@$1
|
||||
# basic test, build the binary
|
||||
go install
|
||||
failed=$?
|
||||
|
Loading…
x
Reference in New Issue
Block a user