1
0
Fork 0
forked from gorb/backend

ci: test ci

This commit is contained in:
Radical 2025-06-01 19:38:19 +02:00
parent ee8211a321
commit 315a8b9954
3 changed files with 17 additions and 26 deletions

View file

@ -3,11 +3,20 @@ when:
branch: main
steps:
- name: rust-build
image: rust:bookworm
commands:
- cargo install cross
- cargo build --release
- cross build --target aarch64-unknown-linux-gnu --release
environment:
CROSS_CONTAINER_IN_CONTAINER: "true"
volumes:
- /var/run/podman/podman.sock:/var/run/docker.sock
- name: container-build-and-publish
image: docker
commands:
- docker login --username radical --password $PASSWORD git.gorb.app
- docker buildx build --platform linux/amd64,linux/arm64 --rm --push -t git.gorb.app/gorb/backend:main .
- docker buildx build --platform linux/amd64,linux/arm64 --rm -t gorb/backend:main .
environment:
PASSWORD:
from_secret: docker_password

View file

@ -1,19 +0,0 @@
when:
- event: push
branch: main
steps:
- name: build-docs
image: rust:bookworm
commands:
- cargo doc --release --no-deps
- name: publish-docs
image: debian:12
commands:
- apt update -y && apt install -y rsync openssh-client
- printf "Host *\n StrictHostKeyChecking no" >> /etc/ssh/ssh_config
- ssh-agent bash -c "ssh-add <(echo '$KEY' | base64 -d) && rsync --archive --verbose --compress --hard-links --delete-during --partial --progress ./target/doc/ root@gorb.app:/var/www/docs.gorb.app/api && ssh root@gorb.app systemctl reload caddy.service"
environment:
KEY:
from_secret: ssh_key