Skip to content

Commit b42dceb

Browse files
committed
chore(workflow): use exec runner replace docker runner
1 parent 7cebb6f commit b42dceb

1 file changed

Lines changed: 22 additions & 35 deletions

File tree

.drone/drone.yml

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,40 @@
11
kind: pipeline
2-
type: docker
2+
type: exec
33
name: default
44

55
steps:
66
- name: build-docs
7-
image: docker.io/drycc/go-dev
8-
privileged: true
97
commands:
108
- make docker-build docker-build-docs
119
- cp _scripts/* _build/html
1210
- cd _build/html && echo "drycc.cc" > CNAME && echo "www.drycc.cc" >> CNAME && git init
1311
environment:
1412
SSH_DEPLOY_KEY:
1513
from_secret: ssh_deploy_key
16-
when:
17-
event:
18-
- push
19-
- tag
20-
volumes:
21-
- name: image_registries
22-
path: /etc/containers/registries.conf
2314

2415
- name: publish-docs
25-
image: docker.io/appleboy/drone-git-push
26-
pull: always
27-
settings:
28-
branch: main
29-
remote: git@github.com:drycc/www.drycc.cc.git
30-
path: _build/html
31-
force: true
32-
commit: true
33-
commit_message: init repo
34-
ssh_key:
16+
commands:
17+
- docker run --rm
18+
-e DRONE_COMMIT_AUTHOR="$DRONE_COMMIT_AUTHOR"
19+
-e DRONE_COMMIT_AUTHOR_EMAIL="$DRONE_COMMIT_AUTHOR_EMAIL"
20+
-e PLUGIN_SSH_KEY="$SSH_DEPLOY_KEY"
21+
-e PLUGIN_BRANCH=main
22+
-e PLUGIN_REMOTE=git@github.com:drycc/www.drycc.cc.git
23+
-e PLUGIN_FORCE=true
24+
-e PLUGIN_COMMIT=true
25+
-e PLUGIN_PATH=_build/html
26+
-e PLUGIN_COMMIT_MESSAGE="init repo"
27+
-v "$(pwd):$(pwd)"
28+
-w "$(pwd)"
29+
appleboy/drone-git-push
30+
environment:
31+
SSH_DEPLOY_KEY:
3532
from_secret: ssh_deploy_key
36-
when:
37-
event:
38-
- push
39-
- tag
4033

4134
- name: publish-charts
42-
image: docker.io/drycc/python-dev
43-
privileged: true
4435
commands:
4536
- pip install -r requirements.txt
46-
- python _scripts/dependency_update.py "$CHARTMUSEUM_API/$([ -z $DRONE_TAG ] && echo testing || echo stable)" "charts/workflow/requirements.yaml"
37+
- python3 _scripts/dependency_update.py "$CHARTMUSEUM_API/$([ -z $DRONE_TAG ] && echo testing || echo stable)" "charts/workflow/requirements.yaml"
4738
- helm package charts/workflow -u --version ${DRONE_TAG:-v1.0.0}
4839
- curl -u $CHARTMUSEUM_USERNAME:$CHARTMUSEUM_PASSWORD -F chart=@workflow-${DRONE_TAG:-v1.0.0}.tgz "$CHARTMUSEUM_API/api/$([ -z $DRONE_TAG ] && echo testing || echo stable)/charts"
4940
- bash _scripts/generate_cache.sh
@@ -54,12 +45,8 @@ steps:
5445
from_secret: chartmuseum_username
5546
CHARTMUSEUM_PASSWORD:
5647
from_secret: chartmuseum_password
57-
when:
58-
event:
59-
- push
60-
- tag
6148

62-
volumes:
63-
- name: image_registries
64-
host:
65-
path: /etc/containers/registries.conf
49+
trigger:
50+
event:
51+
- push
52+
- tag

0 commit comments

Comments
 (0)