From f8337ee55ae83424c689778dd7b55389b297f895 Mon Sep 17 00:00:00 2001 From: "maximilian.schubert@telekom.de" Date: Mon, 4 Dec 2023 14:17:31 +0100 Subject: [PATCH] ci: none release images named: commit- --- .github/workflows/ci.yml | 6 +++--- .goreleaser-ci.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a7ee6ba..62d232b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,12 +39,12 @@ jobs: - name: Get Version id: version - run: jq -r '.version' ./dist/metadata.json | { read value; echo "value=$value"; } >> "$GITHUB_OUTPUT" + run: echo "value=commit-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: - image-ref: "ghcr.io/caas-team/sparrow:v${{ steps.version.outputs.value }}" + image-ref: "ghcr.io/caas-team/sparrow:${{ steps.version.outputs.value }}" format: "sarif" output: "trivy-results.sarif" @@ -61,4 +61,4 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Push snapshot container image - run: docker push ghcr.io/caas-team/sparrow:v${{ steps.version.outputs.value }} \ No newline at end of file + run: docker push ghcr.io/caas-team/sparrow:${{ steps.version.outputs.value }} \ No newline at end of file diff --git a/.goreleaser-ci.yaml b/.goreleaser-ci.yaml index 354f80fd..6eeaa854 100644 --- a/.goreleaser-ci.yaml +++ b/.goreleaser-ci.yaml @@ -1,10 +1,10 @@ project_name: sparrow snapshot: - name_template: "{{ .ShortCommit }}" + name_template: "commit-{{ .ShortCommit }}" builds: - env: [CGO_ENABLED=0] ldflags: - - -s -w -X main.version=v{{ .Version }} + - -s -w -X main.version={{ .Version }} - -extldflags "-static" goos: - linux @@ -13,7 +13,7 @@ builds: - arm64 dockers: - image_templates: - - "ghcr.io/caas-team/sparrow:v{{ .Version }}" + - "ghcr.io/caas-team/sparrow:{{ .Version }}" dockerfile: Dockerfile build_flag_templates: - --label=org.opencontainers.image.title={{ .ProjectName }}