Skip to content

Commit

Permalink
build(ci): fix multiple build-args for release job
Browse files Browse the repository at this point in the history
  • Loading branch information
dwisiswant0 committed Oct 6, 2023
1 parent 1b0b79f commit b79063d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,7 @@ jobs:
- uses: docker/[email protected]
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 }}"
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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}"
Expand All @@ -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
Expand Down

0 comments on commit b79063d

Please sign in to comment.