demo/.woodpecker.yaml

29 lines
793 B
YAML

# .woodpecker.yaml
steps:
- name: Java 构建
image: maven:3.9.6-eclipse-temurin-17
pull: true
commands:
- mvn clean package -DskipTests
# volumes 挂载在单工作流中可正常使用
volumes:
- /tmp/maven-cache:/root/.m2
- name: Docker 构建
image: docker:latest
pull: true
commands:
- docker build -t registry.cn-zhangjiakou.aliyuncs.com/abhors/demo:latest .
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- name: 镜像推送
image: plugins/docker
settings:
repo: registry.cn-zhangjiakou.aliyuncs.com/abhors/demo
tags: latest
registry: registry.cn-zhangjiakou.aliyuncs.com
username:
from_secret: aliyun_acr_username
password:
from_secret: aliyun_acr_password