woodpecker-test #2
1 changed files with 20 additions and 0 deletions
20
.woodpecker.yaml
Normal file
20
.woodpecker.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
steps:
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
commands:
|
||||
- docker login docker.io -u $${DOCKERHUB_USERNAME} -p $${DOCKERHUB_PASSWORD}
|
||||
- export TAG=$(openssl rand -hex 8)
|
||||
- docker build --rm=true -f Dockerfile -t $TAG .
|
||||
- docker tag $TAG $${DOCKERHUB_USERNAME}/$${APP}:latest
|
||||
- docker push $${DOCKERHUB_USERNAME}/$${APP}:latest
|
||||
secrets: [ dockerhub_username, dockerhub_password, app ]
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- name: caprover
|
||||
image: plugins/docker
|
||||
commands:
|
||||
- docker login docker.io -u $${DOCKERHUB_USERNAME} -p $${DOCKERHUB_PASSWORD}
|
||||
- docker run --network=host caprover/cli-caprover:2.2.3 caprover deploy --caproverUrl "$${CAPROVER_URL}" --caproverPassword "$${CAPROVER_PASSWORD}" -a "$${APP}" -i docker.io/$${DOCKERHUB_USERNAME}/$${APP}
|
||||
secrets: [ dockerhub_username, dockerhub_password, caprover_url, caprover_password, app]
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
Loading…
Reference in a new issue