-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.woodpecker.yaml
27 lines (26 loc) · 959 Bytes
/
.woodpecker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
steps:
- name: build and push
image: docker:26
environment:
SOLUTION_DIR: PicLibBot
PROJECT_DIR: PicLibBot
PROJECT_IMAGE_NAME: piclibbot
DOCKER_HOST:
from_secret: NAS_DOCKER_HOST
NAS_CONTAINER_REGISTRY_HOST:
from_secret: NAS_CONTAINER_REGISTRY_HOST
NAS_CONTAINER_REGISTRY_LOGIN:
from_secret: NAS_CONTAINER_REGISTRY_LOGIN
NAS_CONTAINER_REGISTRY_PASSWORD:
from_secret: NAS_CONTAINER_REGISTRY_PASSWORD
commands:
- ls -lh
- docker info
- cd $SOLUTION_DIR
- docker login -u $NAS_CONTAINER_REGISTRY_LOGIN -p $NAS_CONTAINER_REGISTRY_PASSWORD $NAS_CONTAINER_REGISTRY_HOST
- CURRENT_IMAGE_NAME=$NAS_CONTAINER_REGISTRY_HOST/$PROJECT_IMAGE_NAME:latest
- docker build . --progress=plain --file=$PROJECT_DIR/Dockerfile -t $CURRENT_IMAGE_NAME
- docker push $CURRENT_IMAGE_NAME
when:
- event: [ push, manual ]
branch: master