feat(ci): prepare release

This commit is contained in:
Peter 2023-02-28 21:32:41 +01:00
parent 50f7dc1c48
commit 80ffbb17a8
Signed by: prskr
GPG key ID: C1DB5D2E8DB512F9
3 changed files with 38 additions and 20 deletions

View file

@ -21,6 +21,7 @@ steps:
- name: Test - name: Test
image: docker.io/golang:1.20-bullseye image: docker.io/golang:1.20-bullseye
network_mode: host
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
CGO_ENABLED: "1" CGO_ENABLED: "1"
@ -29,6 +30,29 @@ steps:
- sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin - sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
- task test - task test
- name: Snapshot release
image: ghcr.io/goreleaser/goreleaser
when:
event:
- push
- pull_request
volumes:
- name: go-cache
path: /go
commands:
- goreleaser release --clean --snapshot
- name: Release
image: ghcr.io/goreleaser/goreleaser
when:
event:
- tag
volumes:
- name: go-cache
path: /go
commands:
- goreleaser release --clean
--- ---
kind: pipeline kind: pipeline
type: docker type: docker

View file

@ -1,6 +1,7 @@
project_name: goveal project_name: goveal
builds: builds:
- main: ./cmd/goveal/ - id: goveal
main: ./cmd/goveal/
binary: goveal binary: goveal
goos: goos:
- linux - linux
@ -27,17 +28,19 @@ release:
name: goveal name: goveal
mode: replace mode: replace
dockers: kos:
- id: goveal - id: goveal
goos: linux build: goveal
goarch: amd64 base_image: gcr.io/distroless/static:nonroot
goarm: '' repository: code.icb4dc0.de/prskr/goveal
ids: platforms:
- goveal - linux/amd64
image_templates: - linux/arm64
- ghcr.io/baez90/goveal:{{ .Tag }} tags:
- ghcr.io/baez90/goveal:{{ .Major }} - latest
dockerfile: ./build/docker/goveal.dockerfile - '{{.Tag}}'
bare: true
base_import_paths: true
archives: archives:
- replacements: - replacements:

View file

@ -1,9 +0,0 @@
FROM gcr.io/distroless/static:nonroot
USER nonroot:nonroot
COPY --chown=nonroot:nonroot goveal /app/goveal
EXPOSE 2233
ENTRYPOINT ["/app/goveal"]