diff --git a/.github/workflows/release-publish.yaml b/.github/workflows/release-publish.yaml index 734d0d2..ee55cb4 100644 --- a/.github/workflows/release-publish.yaml +++ b/.github/workflows/release-publish.yaml @@ -59,5 +59,7 @@ jobs: - uses: docker/build-push-action@v4.1.1 with: push: true - build-args: "VERSION=${{ inputs.tag || github.ref_name }},PGO_FILE=${{ github.workspace }}/default.pgo" + build-args: | + VERSION=${{ inputs.tag || github.ref_name }} + PGO_FILE=${{ github.workspace }}/default.pgo tags: "ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ inputs.tag || github.ref_name }}" \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f595128..d94dccd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.19-alpine AS build +FROM golang:alpine AS build ARG VERSION="docker" ARG LDFLAGS="-s -w -X github.com/kitabisa/teler-proxy/common.Version=${VERSION}" @@ -15,7 +15,8 @@ RUN go mod download RUN apk add build-base COPY . . -RUN CGO_ENABLED="1" go build -pgo "${PGO_FILE}" -ldflags "${LDFLAGS}" \ +RUN CGO_ENABLED="1" go build \ + -pgo "${PGO_FILE}" -ldflags "${LDFLAGS}" \ -o ./bin/teler-proxy ./cmd/teler-proxy FROM alpine:latest