Skip to content

Commit 9d01c24

Browse files
committed
fix: Try to sovle problem with empty status field
1 parent 5279f79 commit 9d01c24

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/build.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: checkout
17-
uses: actions/checkout@v1
17+
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
2020
- name: Configure git to trust the workspace despite the different owner
2121
run: git config --global --add safe.directory $(realpath .)
22+
- name: Test
23+
run: git describe --abbrev=0 --tags --always
2224
- name: Docker meta
2325
id: meta
2426
uses: docker/metadata-action@v5

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ GO_VERSION := 1.21
33
TAG := $(shell git describe --abbrev=0 --tags --always)
44
HASH := $(shell git rev-parse HEAD)
55
DATE := $(shell date +%Y-%m-%d.%H:%M:%S)
6+
PWD := $(shell pwd)
67

78
LDFLAGS := -w -X github.com/randsw/kubeinfo/handlers.hash=$(HASH) \
89
-X github.com/randsw/kubeinfo/handlers.tag=$(TAG) \
@@ -14,4 +15,7 @@ setup_git:
1415

1516
.PHONY: build
1617
build: setup_git
17-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -a -o kubeinfo main.go
18+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -a -o kubeinfo main.go
19+
20+
test:
21+
echo ${PWD}

handlers/handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func GetHealth(w http.ResponseWriter, r *http.Request) {
7272
enc := json.NewEncoder(w)
7373
w.Header().Set("Content-Type", "application/json; charset=utf-8")
7474
resp := map[string]string{
75-
"name": "Kubeinfo",
75+
"app_name": "Kubeinfo",
7676
"status": "OK",
7777
"tag": tag,
7878
"hash": hash,

kubeinfo

-40.6 MB
Binary file not shown.

0 commit comments

Comments
 (0)