Adjust CI pipeline.
This commit is contained in:
43
.woodpecker/.build-push-deploy copy.yml
Normal file
43
.woodpecker/.build-push-deploy copy.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
steps:
|
||||
build-and-push:
|
||||
image: woodpeckerci/plugin-docker-buildx:5.1
|
||||
settings:
|
||||
username:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
password:
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
registry: registry.binderlab.io
|
||||
repo: registry.binderlab.io/harbormaster-client
|
||||
tags: latest
|
||||
dockerfile: docker/Dockerfile
|
||||
context: .
|
||||
push: true
|
||||
when:
|
||||
event: manual
|
||||
|
||||
deploy-static-site:
|
||||
image: appleboy/drone-ssh
|
||||
environment:
|
||||
REGISTRY_USERNAME:
|
||||
from_secret: REGISTRY_USERNAME
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: REGISTRY_PASSWORD
|
||||
DEPLOY_PATH:
|
||||
from_secret: DEPLOY_PATH
|
||||
settings:
|
||||
host: binderlab.io
|
||||
username: binderb
|
||||
envs:
|
||||
- REGISTRY_USERNAME
|
||||
- REGISTRY_PASSWORD
|
||||
- DEPLOY_PATH
|
||||
key:
|
||||
from_secret: SSH_PRIVATE_KEY
|
||||
script:
|
||||
- echo "$REGISTRY_PASSWORD" | docker login registry.binderlab.io --username "$REGISTRY_USERNAME" --password-stdin
|
||||
- docker pull registry.binderlab.io/harbormaster-client:latest
|
||||
- docker create --name temp-harbormaster-client registry.binderlab.io/harbormaster-client:latest
|
||||
- docker cp temp-harbormaster-client:/app/build/ $DEPLOY_PATH
|
||||
- docker rm temp-harbormaster-client
|
||||
when:
|
||||
event: manual
|
||||
Reference in New Issue
Block a user