Skip to content

Commit 2055e90

Browse files
committed
fix(ci): use embeddable dummy file for Go embed directive
- Replace .gitkeep with README.txt (embeddable file) - Fixes error: cannot embed directory: contains no embeddable files - Go embed directive requires at least one non-hidden file
1 parent 646ecb9 commit 2055e90

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
go-version: '1.24'
2121

2222
- name: Create dummy frontend directory
23-
run: mkdir -p frontend/dist && touch frontend/dist/.gitkeep
23+
run: mkdir -p frontend/dist && echo "CLI build - frontend not included" > frontend/dist/README.txt
2424

2525
- name: Build
2626
run: go build -v ./cmd/... ./internal/... ./pkg/...
@@ -85,7 +85,7 @@ jobs:
8585
go-version: '1.24'
8686

8787
- name: Create dummy frontend directory
88-
run: mkdir -p frontend/dist && touch frontend/dist/.gitkeep
88+
run: mkdir -p frontend/dist && echo "CLI build - frontend not included" > frontend/dist/README.txt
8989

9090
- name: golangci-lint
9191
uses: golangci/golangci-lint-action@v3

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ before:
55
hooks:
66
- go mod tidy
77
# Create dummy frontend/dist for main.go embed directive
8-
- mkdir -p frontend/dist && touch frontend/dist/.gitkeep
8+
- mkdir -p frontend/dist && echo "CLI build - frontend not included" > frontend/dist/README.txt
99
# Test only CLI packages (exclude root main.go which requires frontend/dist)
1010
- go test ./cmd/... ./internal/... ./pkg/...
1111

0 commit comments

Comments
 (0)