feat(ci): prepare release
This commit is contained in:
parent
50f7dc1c48
commit
80ffbb17a8
3 changed files with 38 additions and 20 deletions
24
.drone.yml
24
.drone.yml
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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"]
|
Loading…
Reference in a new issue