Skip to content

Commit

Permalink
ci: none release images named: commit-<shortsha>
Browse files Browse the repository at this point in the history
  • Loading branch information
y-eight committed Dec 4, 2023
1 parent 8059c4c commit f8337ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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 }}
run: docker push ghcr.io/caas-team/sparrow:${{ steps.version.outputs.value }}
6 changes: 3 additions & 3 deletions .goreleaser-ci.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit f8337ee

Please sign in to comment.