mirror of
https://github.com/apricote/hcloud-upload-image.git
synced 2026-01-13 13:21:01 +00:00
feat: publish container image (#82)
Use `goreleaser` and `ko` to automatically build and publish container images in the release workflow. The images are published to `ghcr.io/apricote/hcloud-upload-image`. Co-authored-by: Ilja Malachowski <malahovskiy.in@gmail.com>
This commit is contained in:
parent
02e80b277f
commit
91df729f1c
3 changed files with 38 additions and 4 deletions
|
|
@ -7,7 +7,8 @@ before:
|
|||
- ./scripts/completions.sh
|
||||
|
||||
builds:
|
||||
- env:
|
||||
- id: default
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- linux
|
||||
|
|
@ -21,7 +22,7 @@ builds:
|
|||
- -X {{ .ModulePath }}/internal/version.versionPrerelease=
|
||||
|
||||
archives:
|
||||
- format: tar.gz
|
||||
- formats: [ "tar.gz" ]
|
||||
# this name template makes the OS and Arch compatible with the results of `uname`.
|
||||
name_template: >-
|
||||
{{ .ProjectName }}_
|
||||
|
|
@ -33,7 +34,7 @@ archives:
|
|||
# use zip for windows archives
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
formats: [ "zip" ]
|
||||
|
||||
files:
|
||||
- README.md
|
||||
|
|
@ -104,9 +105,23 @@ aurs:
|
|||
install -Dm644 "./completions/hcloud-upload-image.zsh" "${pkgdir}/usr/share/zsh/site-functions/_hcloud-upload-image"
|
||||
install -Dm644 "./completions/hcloud-upload-image.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/hcloud-upload-image.fish"
|
||||
|
||||
kos:
|
||||
- id: container-images
|
||||
build: default
|
||||
repositories:
|
||||
- ghcr.io/apricote
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
base_import_paths: true
|
||||
labels:
|
||||
org.opencontainers.image.source: https://github.com/apricote/hcloud-upload-image
|
||||
tags:
|
||||
- latest
|
||||
- "{{.Tag}}"
|
||||
|
||||
snapshot:
|
||||
name_template: "{{ .Version }}-dev+{{ .ShortCommit }}"
|
||||
version_template: "{{ .Version }}-dev+{{ .ShortCommit }}"
|
||||
|
||||
changelog:
|
||||
# Generated by release-please
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue