From eb3aca34eacefa648e8cf2da8722e1fd9a4ae42f Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 14 Nov 2024 12:35:24 +0100 Subject: [PATCH 1/2] ci(github-actions): replace ghrc tocken with a github token created by the actions job --- .github/workflows/docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 698fbe8..9f143bb 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -31,8 +31,8 @@ jobs: uses: docker/login-action@v1 with: registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GHCR_TOKEN }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Set output id: vars From 2fbdf3625a8b96a937b969a87a1ae261541abb9c Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 14 Nov 2024 12:39:04 +0100 Subject: [PATCH 2/2] refactor(Dockerfile): fix warnings from docker build --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc00144..8758db6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23.3-alpine as builder +FROM golang:1.23.3-alpine AS builder RUN apk add --update make WORKDIR /go/src/github/flagship-io/decision-api @@ -10,11 +10,11 @@ RUN go mod download COPY . . ARG VERSION -ENV VERSION $VERSION +ENV VERSION=$VERSION RUN make build FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /root/ COPY --from=builder /go/src/github/flagship-io/decision-api/bin/server ./ -CMD ["./server"] \ No newline at end of file +CMD ["./server"]