liveterm/.woodpecker.yml

48 lines
1.2 KiB
YAML

matrix:
RUST: [stable]
pipeline:
# test:
# image: rust
# environment: [CARGO_TERM_COLOR=always]
# commands:
# - rustup default $RUST
# - cargo check
# - cargo test
build-docker-image:
image: nixos/nix
commands:
- ls -la
- pwd
- nix --extra-experimental-features "nix-command flakes" build -o image.tar.gz .#liveterm-docker
- cp --remove-destination $(readlink -f image.tar.gz) /shared/image.tar.gz
volumes:
- "liveterm-shared:/shared"
when:
# event: tag
branch: master
push-container:
image: podman-image
commands:
- ls -la
- pwd
- podman load < /shared/image.tar.gz
- export REPO=git.mzhang.io/michael/liveterm
- "export TAG=$(podman images liveterm --format '{{.Tag}}')"
- "podman tag liveterm:$TAG $REPO:$TAG"
- "podman tag liveterm:$TAG $REPO:latest"
- podman login git.mzhang.io --username michael --password $DOCKER_TOKEN
- "podman push $REPO:$TAG"
- "podman push $REPO:latest"
- exit 1
secrets:
- DOCKER_TOKEN
volumes:
- "liveterm-shared:/shared"
when:
# event: tag
branch: master