48 lines
877 B
YAML
48 lines
877 B
YAML
version: "3"
|
|
vars:
|
|
NIX_CMD_BASE: nix develop . -c
|
|
tasks:
|
|
ci:
|
|
cmds:
|
|
- task: lint
|
|
- task: test
|
|
|
|
ci-publish:
|
|
cmds:
|
|
- task: lint
|
|
- task: test
|
|
- task: docker
|
|
|
|
docker:
|
|
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}}
|
|
|
|
lint:
|
|
cmds:
|
|
- |
|
|
{{.NIX_CMD_BASE}} \
|
|
golangci-lint run --enable-all
|
|
|
|
test:
|
|
cmds:
|
|
- |
|
|
{{.NIX_CMD_BASE}} \
|
|
go test -v -race ./...
|
|
|
|
tidy:
|
|
cmds:
|
|
- go mod tidy
|
|
- go mod vendor
|