From c260ecf7e447bd648c14717b02146160354d6489 Mon Sep 17 00:00:00 2001 From: Diego Becciolini Date: Wed, 13 Dec 2023 20:40:44 +0000 Subject: [PATCH] use locally checked out lib in the docker job see https://github.com/mattn/go-sqlite3/pull/1177 --- .github/workflows/docker.yaml | 3 +-- _example/simple/Dockerfile | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 83faeb6..7983de4 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -17,6 +17,5 @@ jobs: - name: Run example - simple run: | - cd ./_example/simple - docker build -t simple . + docker build -t simple -f ./_example/simple/Dockerfile . docker run simple | grep 99\ こんにちは世界099 diff --git a/_example/simple/Dockerfile b/_example/simple/Dockerfile index c19f6e6..b8545da 100644 --- a/_example/simple/Dockerfile +++ b/_example/simple/Dockerfile @@ -26,7 +26,9 @@ WORKDIR /workspace COPY . /workspace/ RUN \ + cd _example/simple && \ go mod init github.com/mattn/sample && \ + go mod edit -replace=github.com/mattn/go-sqlite3=../.. && \ go mod tidy && \ go install -ldflags='-s -w -extldflags "-static"' ./simple.go