From 97872685146707e513e8a3adf0982cde8518a26f Mon Sep 17 00:00:00 2001 From: Matias Date: Thu, 3 Oct 2024 11:04:02 -0300 Subject: [PATCH] Upgrading upload-artifact to v3 (#854) --- .github/workflows/ci-test.yml | 3 +-- Dockerfile | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 1112da3bc..78de2738b 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -29,7 +29,7 @@ jobs: with: version: latest args: --out-format=checkstyle:golanglint.xml --timeout=300s --max-issues-per-linter=0 --max-same-issues=0 --new-from-rev=origin/${{ github.base_ref }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: golangcilint retention-days: 1 @@ -90,4 +90,3 @@ jobs: result_code=${PIPESTATUS[0]} echo "log=$(sed -ze 's/%/%25/g;s/\n/%0A/g' test.log)" >> $GITHUB_OUTPUT exit $result_code - \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..0aff73ff5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.21 as builder + +WORKDIR /app + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . + +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOEXPERIMENT=boringcrypto go build -tags=boringcrypto -o tyk-pump . + +FROM debian:bookworm-slim + +WORKDIR /opt/tyk-pump + +COPY --from=builder /app/tyk-pump . + +COPY pump.example.conf /opt/tyk-pump/pump.conf + +EXPOSE 8080 + +ENTRYPOINT ["/opt/tyk-pump/tyk-pump"] +CMD ["--conf=/opt/tyk-pump/pump.conf"] \ No newline at end of file