created CD pipeline to complement the existing gitea/woodpecker CI pipeline: build, push to registry, deploy to staging on main
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
@@ -21,4 +21,32 @@ steps:
|
||||
- status: failure
|
||||
commands:
|
||||
- cat ./src/functional_tests/screendumps/*.html || echo "No screendumps found"
|
||||
|
||||
- name: build-and-push
|
||||
image: docker:cli
|
||||
environment:
|
||||
REGISTRY_PASSWORD:
|
||||
from_secret: gitea_registry_password
|
||||
commands:
|
||||
- echo "$REGISTRY_PASSWORD" | docker login gitea.earthmanrpg.me -u discoman --password-stdin
|
||||
- docker build -t gitea.earthmanrpg.me/discoman/gamearray:latest .
|
||||
- docker push gitea.earthmanrpg.me/discoman/gamearray:latest
|
||||
when:
|
||||
- branch: main
|
||||
- event: push
|
||||
|
||||
- name: deploy
|
||||
image: alpine
|
||||
environment:
|
||||
SSH_KEY:
|
||||
from_secret: deploy_ssh_key
|
||||
commands:
|
||||
- apk add --no-cache openssh-client
|
||||
- mkdir -p ~/.ssh
|
||||
- printf '%s\n' "$SSH_KEY" > ~/.ssh/id_ed25519
|
||||
- chmod 600 ~/.ssh/id_ed25519
|
||||
- ssh -o StrictHostKeyChecking=no discoman@staging.earthmanrpg.me /opt/gamearray/deploy.sh
|
||||
when:
|
||||
- branch: main
|
||||
- event: push
|
||||
|
||||
|
||||
Reference in New Issue
Block a user