liveterm/.woodpecker.yml
Michael Zhang 3c4896f220
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
a
2023-02-11 17:57:58 -06:00

47 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