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'
|
path: 'examples'
|
||||||
|
|
||||||
- name: Build all
|
- 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
|
working-directory: examples
|
||||||
|
|
2
.github/workflows/micro-main.yml
vendored
2
.github/workflows/micro-main.yml
vendored
@ -32,6 +32,6 @@ jobs:
|
|||||||
path: 'micro'
|
path: 'micro'
|
||||||
|
|
||||||
- name: Build all
|
- 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
|
working-directory: micro
|
||||||
|
|
@ -32,7 +32,7 @@ function check_dir {
|
|||||||
}
|
}
|
||||||
failed_arr=()
|
failed_arr=()
|
||||||
failed=0
|
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
|
check_dir . $1
|
||||||
if [ $failed -gt 0 ]; then
|
if [ $failed -gt 0 ]; then
|
||||||
echo Some builds failed
|
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
|
# set -x
|
||||||
|
|
||||||
failed=0
|
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
|
# basic test, build the binary
|
||||||
go install
|
go install
|
||||||
failed=$?
|
failed=$?
|
||||||
|
Loading…
Reference in New Issue
Block a user