From 27a9fe91ded6468f376f88bee632d9de8f5d6836 Mon Sep 17 00:00:00 2001 From: Maxence Maireaux Date: Mon, 24 Apr 2023 19:59:53 +0200 Subject: [PATCH] ci: Update Dockerfile flow --- .github/workflows/template_sdk-publish.yaml | 4 ++-- Dockerfile | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/template_sdk-publish.yaml b/.github/workflows/template_sdk-publish.yaml index fa0742bbe..e15dff219 100644 --- a/.github/workflows/template_sdk-publish.yaml +++ b/.github/workflows/template_sdk-publish.yaml @@ -41,8 +41,8 @@ jobs: uses: arduino/setup-task@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - # - name: Launch Generate - # run: task sdk:generate VERSION=${{ inputs.VERSION }} -- ${{ matrix.sdk }} + - name: Launch Generate + run: task sdk:generate VERSION=${{ inputs.VERSION }} -- ${{ matrix.sdk }} - uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: Upgrade Release to ${{ inputs.VERSION }} diff --git a/Dockerfile b/Dockerfile index 327659b9e..c56bffc76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,15 +11,8 @@ ARG VERSION ARG SEGMENT_WRITE_KEY WORKDIR /go/src/github.com/numary/ledger # get deps first so it's cached -COPY go.mod . -COPY go.sum . -RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ - --mount=type=cache,id=gobuild,target=/root/.cache/go-build \ - go mod download COPY . . -RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ - --mount=type=cache,id=gobuild,target=/root/.cache/go-build \ - CGO_ENABLED=1 GOOS=linux GOARCH=$TARGETARCH \ +RUN CGO_ENABLED=1 GOOS=linux GOARCH=$TARGETARCH \ CC=$TARGETARCH-linux-gnu-gcc \ go build -o numary -tags json1,netgo \ -ldflags="-X github.com/numary/ledger/cmd.Version=${VERSION} \