liveterm/.woodpecker.yml

44 lines
1 KiB
YAML
Raw Normal View History

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
2023-02-11 18:14:57 +00:00
- nix --extra-experimental-features "nix-command flakes" build -o image.tar.gz .#liveterm-docker
- cp $(readlink -f image.tar.gz) /shared/image.tar.gz
2023-02-11 17:34:35 +00:00
volumes:
- "liveterm-shared:/shared"
when:
# event: tag
branch: master
deploy:
2023-02-11 17:56:34 +00:00
image: podman-image
2023-02-11 17:34:35 +00:00
commands:
- ls -la
- pwd
2023-02-11 18:14:57 +00:00
- podman load < /shared/image.tar.gz
2023-02-11 17:34:35 +00:00
- export REPO=git.mzhang.io/michael/liveterm
2023-02-11 18:14:57 +00:00
- export TAG=$(podman images liveterm --format "{{.Tag}}")
- podman tag liveterm:$TAG $REPO:$TAG
- podman login git.mzhang.io --username michael --password $DOCKER_TOKEN
- podman push $REPO:$TAG
secrets:
- DOCKER_TOKEN
2023-02-11 17:34:35 +00:00
volumes:
- "liveterm-shared:/shared"
when:
# event: tag
branch: master