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
image: docker.io/golang:1.20-bullseye
network_mode: host
environment:
GO111MODULE: "on"
CGO_ENABLED: "1"
@ -29,6 +30,29 @@ steps:
- sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
- 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
type: docker

View file

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