更新 .drone.yml
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
220e41e167
commit
4dde05bd0f
18
.drone.yml
18
.drone.yml
@ -8,24 +8,8 @@ clone:
|
|||||||
steps:
|
steps:
|
||||||
- name: git-incremental-sync
|
- name: git-incremental-sync
|
||||||
image: alpine/git:latest
|
image: alpine/git:latest
|
||||||
volumes:
|
|
||||||
- name: git-repo-cache
|
|
||||||
path: /cache
|
|
||||||
commands:
|
commands:
|
||||||
|
- sleep 10
|
||||||
- mkdir -p /cache/my-repo
|
|
||||||
- cd /cache/my-repo
|
|
||||||
|
|
||||||
- |
|
|
||||||
if [ -d .git ]; then
|
|
||||||
git remote set-url origin ${DRONE_REPO_URL}
|
|
||||||
git fetch origin --depth=1 ${DRONE_COMMIT_BRANCH}
|
|
||||||
git reset --hard ${DRONE_COMMIT_SHA}
|
|
||||||
else
|
|
||||||
git clone ${DRONE_REPO_URL} . --depth=1 --branch=${DRONE_COMMIT_BRANCH}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- cp -r /cache/my-repo ${DRONE_WORKSPACE}
|
|
||||||
|
|
||||||
node:
|
node:
|
||||||
app: build
|
app: build
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user