diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 3b7a7cd..f1dd498 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -35,7 +35,7 @@ jobs: - name: Docker login run: echo $CR_TOKEN | docker login -u $CR_USER --password-stdin - name: Docker Build - run: docker build --pull -t "$IMAGE_NAME:latest" --build-arg BUILD_VERSION=$RELEASE_VERSION --build-arg BUILD_COMMIT=$GITHUB_SHA --build-arg DATE=$(date) . + run: DATE=$(date) docker build --pull -t "$IMAGE_NAME:latest" --build-arg BUILD_VERSION=$RELEASE_VERSION --build-arg BUILD_COMMIT=$GITHUB_SHA --build-arg DATE=$DATE . - name: Docker Push (latest tag) run: docker push "$IMAGE_NAME:latest" - name: Docker Tag latest as build tag diff --git a/Dockerfile b/Dockerfile index 8f1b21c..cb226d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ ENV BUILD_COMMIT="$BUILD_COMMIT" ENV BUILD_DATE="$BUILD_DATE" # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o git-secrets main.go -ldflags "-X main.version=$BUILD_VERSION -X main.commit=$BUILD_COMMIT -X main.date=$BUILD_DATE" +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o git-secrets -ldflags "-X main.version=$BUILD_VERSION -X main.commit=$BUILD_COMMIT -X main.date=$BUILD_DATE" FROM alpine:latest WORKDIR /git-secrets