This repository was archived by the owner on Jul 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
50 lines (40 loc) · 1.28 KB
/
Taskfile.yaml
File metadata and controls
50 lines (40 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
version: '3'
vars:
IMAGE_NAME: docker/docker-index:local
tasks:
go:test:
cmds:
- go test ./...
go:build:
cmds:
- go build -o docker-index -ldflags="-w -s -X 'github.com/docker/index-cli-plugin/internal.version={{.GIT_COMMIT}}'" ./cmd/docker-index
env:
CGO_ENABLED: 0
vars:
GIT_COMMIT:
sh: git describe --tags | cut -c 2-
go:install:
deps: [go:build]
cmds:
- mkdir -p ~/.docker/cli-plugins
- install docker-index ~/.docker/cli-plugins/docker-index
go:fmt:
cmds:
- goimports -w -local github.com/atomist-skills,github.com/docker,github.com/docker/index-cli-plugin .
- gofmt -w .
#- go mod tidy
go:lint:
cmds:
- docker run --rm -v $(pwd):/app -v $(go env GOPATH)/pkg:/go/pkg -v $(go env GOCACHE):/cache/go -e GOCACHE=/cache/go -e GOLANGCI_LINT_CACHE=/cache/go -w /app golangci/golangci-lint:v1.50.1 golangci-lint run -v --timeout 10m
go:release:
cmds:
- goreleaser release --rm-dist
go:snapshot:
cmds:
- goreleaser release --snapshot --rm-dist
docker:build:
cmds:
- docker buildx build . -f Dockerfile -t {{.IMAGE_NAME}} --load
docker:build:all:
cmds:
- docker buildx build . -f Dockerfile -t {{.IMAGE_NAME}} --platform=linux/amd64,linux/arm64