Skip to content

Commit 84a8d6f

Browse files
committed
Add Woodpecker CI scripts.
1 parent 93f162d commit 84a8d6f

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

.woodpecker/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This folder stores scripts for testing in our own CI/CD platform based on Woodpecker CI located in USTC Knowledge Computing Laboratory, which may contains many absolute URLs hard coded, so do not use it.

.woodpecker/docker.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
when:
2+
- event: push
3+
- event: pull_request
4+
5+
clone:
6+
git:
7+
image: woodpeckerci/plugin-git:2.6
8+
settings:
9+
tags: true
10+
partial: false
11+
12+
steps:
13+
- name: tagging
14+
image: mcp/git:latest
15+
commands:
16+
- git describe --tags | tee .tag
17+
18+
- name: docker
19+
image: woodpeckerci/plugin-docker-buildx:6-insecure
20+
settings:
21+
repo: git.kclab.cloud/hzhangxyz/qmb
22+
username: hzhangxyz
23+
password:
24+
from_secret: gitea_package
25+
registry: git.kclab.cloud
26+
tags_file: .tag
27+
buildkit_config: |
28+
[registry."docker.io"]
29+
mirrors = ["https://docker.mirrors.kclab.cloud/"]
30+
build_args:
31+
PYPI_MIRROR: https://mirrors.ustc.edu.cn/pypi/simple

.woodpecker/wheels.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
when:
2+
- event: push
3+
- event: pull_request
4+
5+
variables:
6+
- &pip_config
7+
PIP_INDEX_URL: https://mirrors.ustc.edu.cn/pypi/simple
8+
- &repo_config
9+
TWINE_REPOSITORY_URL: https://git.kclab.cloud/api/packages/hzhangxyz/pypi
10+
TWINE_USERNAME: hzhangxyz
11+
TWINE_PASSWORD:
12+
from_secret: gitea_package
13+
14+
clone:
15+
git:
16+
image: woodpeckerci/plugin-git:2.6
17+
settings:
18+
tags: true
19+
partial: false
20+
21+
steps:
22+
- name: build
23+
image: python:3.12
24+
environment:
25+
<<: *pip_config
26+
commands:
27+
- pip install pipx
28+
- pipx run build
29+
30+
- name: upload
31+
image: python:3.12
32+
environment:
33+
<<: [*pip_config, *repo_config]
34+
commands:
35+
- pip install pipx
36+
- pipx run twine upload dist/* --verbose

0 commit comments

Comments
 (0)