Fix the pull request branch issues (#274)
This commit is contained in:
parent
31b91bc31a
commit
95c24738db
@ -1,7 +1,6 @@
|
||||
---
|
||||
pipeline:
|
||||
build:
|
||||
privileged: true
|
||||
image: rancher/dind:v0.6.0
|
||||
commands:
|
||||
- ./scripts/ci
|
||||
|
@ -6,6 +6,10 @@ cd $(dirname $0)/..
|
||||
trap "rm -rf /scratch/*" exit
|
||||
|
||||
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
if [ -n "${DRONE_BRANCH}" ]; then
|
||||
git checkout -b ${DRONE_BRANCH}
|
||||
GIT_BRANCH=${DRONE_BRANCH}
|
||||
fi
|
||||
|
||||
if [ "$GIT_BRANCH" != "master" ]; then
|
||||
sed -i "s#master#$GIT_BRANCH#" ./scripts/repo.json
|
||||
|
Loading…
x
Reference in New Issue
Block a user