fix(ci): fetch GeoLite2 mmdb before agent build

Agent embeds GeoLite2-Country.mmdb but the file is not checked into the
repository. Download it in CI, Docker, and Makefile build paths via
scripts/fetch-agent-geoip-mmdb.sh, and correct the gitignore exception
path for the geoipdata package.
This commit is contained in:
ryan
2026-06-20 14:03:43 +08:00
parent 6975a6c290
commit 3a368119e5
6 changed files with 27 additions and 1 deletions
+3
View File
@@ -17,6 +17,9 @@ RUN --mount=type=cache,target=/go/pkg/mod \
go mod download
COPY . .
RUN apk add --no-cache curl \
&& curl -fsSL -o internal/apps/agent/geoipdata/GeoLite2-Country.mmdb \
https://raw.githubusercontent.com/Loyalsoldier/geoip/release/GeoLite2-Country.mmdb
RUN --mount=type=cache,target=/go/pkg/mod \
--mount=type=cache,target=/root/.cache/go-build \
go build -trimpath -ldflags "-s -w -X 'github.com/Rain-kl/Wavelet/internal/apps/agent/config.Version=$VERSION'" -o /build/bin/openflare-agent ./cmd/agent/main.go