From d1b2dbe4d97fe6d23e9cb71fa4518f719acf085d Mon Sep 17 00:00:00 2001 From: Fabio Bonelli Date: Wed, 19 Oct 2022 18:36:56 +0200 Subject: [PATCH] chore: properly set the version and fix Docker image --- .github/workflows/test_and_publish_docker_image.yml | 4 ++++ Dockerfile | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/test_and_publish_docker_image.yml b/.github/workflows/test_and_publish_docker_image.yml index d93b426..177863a 100644 --- a/.github/workflows/test_and_publish_docker_image.yml +++ b/.github/workflows/test_and_publish_docker_image.yml @@ -11,6 +11,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + # The build job will use the .git directory to + # infer the current version to embed in the binary + fetch-depth: 0 - uses: actions/setup-go@v3 with: go-version: '1.18' diff --git a/Dockerfile b/Dockerfile index 1e939df..a8bd5d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,5 +6,7 @@ RUN go build -ldflags "-s -w -X 'github.com/italia/publiccode-crawler/v3/interna FROM alpine:3 +RUN apk add --no-cache gcompat + COPY --from=build /src/publiccode-crawler /usr/local/bin/publiccode-crawler CMD ["publiccode-crawler", "crawl"]