diff --git a/.github/workflows/spectro-release.yaml b/.github/workflows/spectro-release.yaml index 8c49d56..baa9236 100644 --- a/.github/workflows/spectro-release.yaml +++ b/.github/workflows/spectro-release.yaml @@ -20,11 +20,11 @@ jobs: uses: mukunku/tag-exists-action@v1.2.0 id: checkTag with: - tag: spectro-v${{ github.event.inputs.release_version }} + tag: v${{ github.event.inputs.release_version }}-spectro - if: ${{ steps.checkTag.outputs.exists == 'true' }} run: | - echo "Tag already exists for spectro-v${{ github.event.inputs.release_version }}..." + echo "Tag already exists for v${{ github.event.inputs.release_version }}-spectro..." exit 1 - uses: actions/checkout@v3 @@ -60,9 +60,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: spectro-v${{ github.event.inputs.release_version }} - release_name: Release spectro-v${{ github.event.inputs.release_version }} + tag_name: v${{ github.event.inputs.release_version }}-spectro + release_name: Release v${{ github.event.inputs.release_version }}-spectro body: | - Release version ${{ github.event.inputs.release_version }} + Release version v${{ github.event.inputs.release_version }}-spectro draft: false prerelease: false diff --git a/Dockerfile b/Dockerfile index 3fc0f7e..deeea66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,14 @@ # Build the manager binary -FROM golang:1.19.8 as builder +FROM golang:1.19.10-alpine3.18 as builder # FIPS ARG CRYPTO_LIB ENV GOEXPERIMENT=${CRYPTO_LIB:+boringcrypto} WORKDIR /workspace +RUN apk update +RUN apk add git gcc g++ curl + # Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum @@ -19,6 +22,14 @@ COPY . . # Build RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags "${LDFLAGS} -extldflags '-static'" -a -o manager main.go +RUN if [ ${CRYPTO_LIB} ]; \ + then \ + CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags "${LDFLAGS} -linkmode=external -extldflags '-static'" -a -o manager main.go ;\ + else \ + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags "${LDFLAGS} -extldflags '-static'" -a -o manager main.go ;\ + fi + + # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details #FROM gcr.io/distroless/static:latest