2023-02-11 04:34:11 +00:00
|
|
|
matrix:
|
|
|
|
RUST: [stable]
|
|
|
|
|
|
|
|
pipeline:
|
|
|
|
test:
|
|
|
|
image: rust
|
|
|
|
environment: [CARGO_TERM_COLOR=always]
|
|
|
|
commands:
|
|
|
|
- rustup default $RUST
|
|
|
|
- cargo check
|
|
|
|
- cargo test
|
2023-02-11 17:34:35 +00:00
|
|
|
|
|
|
|
build-docker-image:
|
|
|
|
image: nixos/nix
|
|
|
|
commands:
|
|
|
|
- ls -la
|
|
|
|
- pwd
|
|
|
|
- nix --extra-experimental-features "nix-command flakes" build -o /shared/image.tar.gz .#liveterm-docker
|
|
|
|
volumes:
|
|
|
|
- "liveterm-shared:/shared"
|
|
|
|
when:
|
|
|
|
# event: tag
|
|
|
|
branch: master
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
image: plugins/docker
|
|
|
|
commands:
|
|
|
|
- ls -la
|
|
|
|
- pwd
|
|
|
|
- docker load /shared/image.tar.gz
|
|
|
|
- export REPO=git.mzhang.io/michael/liveterm
|
|
|
|
- export TAG=$(docker images liveterm --format "{{.Tag}}")
|
|
|
|
- docker tag liveterm:$TAG $REPO:$TAG
|
|
|
|
- docker push $REPO:$TAG
|
|
|
|
volumes:
|
|
|
|
- "liveterm-shared:/shared"
|
|
|
|
when:
|
|
|
|
# event: tag
|
|
|
|
branch: master
|