caddy-log-exporter/Taskfile.yml

57 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-09-19 11:21:05 +02:00
version: "3"
vars:
NIX_CMD_BASE: nix develop . -c
tasks:
ci:
cmds:
- task: lint
- task: test
- task: docker-inspect
2024-09-20 09:21:49 +02:00
ci-publish:
cmds:
- task: lint
- task: test
- task: docker-publish
2024-09-20 09:21:49 +02:00
docker-publish:
2024-09-20 09:21:49 +02:00
requires:
vars:
- GITHUB_USERNAME
- GITHUB_PASSWORD
- GIT_TAG
cmds:
- |
{{.NIX_CMD_BASE}} \
skopeo \
--insecure-policy \
copy \
--dest-username {{.GITHUB_USERNAME}} --dest-password {{.GITHUB_PASSWORD}} \
docker-archive://$(nix build .#docker --print-out-paths) \
docker://ghcr.io/xsteadfastx/caddy-log-exporter:{{.GIT_TAG}}
2024-09-19 11:21:05 +02:00
docker-inspect:
cmds:
- |
{{.NIX_CMD_BASE}} \
skopeo \
inspect \
docker-archive://$(nix build .#docker --print-out-paths)
2024-09-19 11:21:05 +02:00
lint:
cmds:
2024-09-20 09:21:49 +02:00
- |
{{.NIX_CMD_BASE}} \
golangci-lint run --enable-all
2024-09-19 11:21:05 +02:00
test:
cmds:
2024-09-20 09:21:49 +02:00
- |
{{.NIX_CMD_BASE}} \
go test -v -race ./...
2024-09-19 12:01:49 +02:00
tidy:
cmds:
- go mod tidy
- go mod vendor