22 lines
494 B
YAML
22 lines
494 B
YAML
steps:
|
|
- name: smoke
|
|
image: alpine:3.20
|
|
commands:
|
|
- echo "Woodpecker can clone and run this repository."
|
|
- test -f Dockerfile
|
|
- test -f index.html
|
|
|
|
- name: build-and-push
|
|
image: docker:28-cli
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
commands:
|
|
- docker version
|
|
- docker build -t localhost:5050/cicd-demo:latest .
|
|
- docker push localhost:5050/cicd-demo:latest
|
|
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
- event: manual
|