Adjust CI pipeline.

This commit is contained in:
2025-03-12 09:09:45 -05:00
parent 26c1ccc67e
commit 8b748fcb70
3 changed files with 19 additions and 43 deletions

View File

@@ -1,43 +0,0 @@
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

View File

@@ -0,0 +1,18 @@
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: push
branch:
- main

View File

@@ -22,6 +22,7 @@ steps:
- echo "$REGISTRY_PASSWORD" | docker login registry.binderlab.io --username "$REGISTRY_USERNAME" --password-stdin - echo "$REGISTRY_PASSWORD" | docker login registry.binderlab.io --username "$REGISTRY_USERNAME" --password-stdin
- docker pull registry.binderlab.io/harbormaster-client:latest - docker pull registry.binderlab.io/harbormaster-client:latest
- docker create --name temp-harbormaster-client registry.binderlab.io/harbormaster-client:latest - docker create --name temp-harbormaster-client registry.binderlab.io/harbormaster-client:latest
- pwd
- docker cp temp-harbormaster-client:/app/build/ $DEPLOY_PATH - docker cp temp-harbormaster-client:/app/build/ $DEPLOY_PATH
- docker rm temp-harbormaster-client - docker rm temp-harbormaster-client
when: when: