Build and test forked PRs properly (#1738)

* build forks on PRs properly
This commit is contained in:
Dominic Wong 2020-06-24 23:41:27 +01:00 committed by GitHub
parent 00cd07a3a6
commit fcd307d902
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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=$?