feat(ci): use ko for image builds
All checks were successful
Go build / build (push) Successful in 5m14s
All checks were successful
Go build / build (push) Successful in 5m14s
This commit is contained in:
parent
9dbc236e4f
commit
c5a19176b0
2 changed files with 28 additions and 9 deletions
|
@ -24,6 +24,19 @@ jobs:
|
|||
with:
|
||||
# Semantic version range syntax or exact version of Go
|
||||
go-version: '1.21.x'
|
||||
|
||||
- name: Install ko
|
||||
run: |
|
||||
set -e
|
||||
arch=$(uname -m)
|
||||
case $arch in
|
||||
aarch64)
|
||||
arch="arm64"
|
||||
;;
|
||||
esac
|
||||
curl -L $(curl -L -s https://api.github.com/repos/ko-build/ko/releases/latest | jq -r "[.assets[] | select(.name | endswith(\"Linux_${arch}.tar.gz\"))][0].browser_download_url") | tar -C /tmp -xzf -
|
||||
mv /tmp/ko /usr/local/bin
|
||||
ko version
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
|
|
|
@ -40,15 +40,21 @@ archives:
|
|||
- nurse
|
||||
format: tar.gz
|
||||
|
||||
dockers:
|
||||
- ids:
|
||||
- nurse
|
||||
image_templates:
|
||||
- code.icb4dc0.de/prskr/nurse:latest
|
||||
- code.icb4dc0.de/prskr/nurse:{{ .Tag }}
|
||||
- code.icb4dc0.de/prskr/nurse:{{ .Major }}
|
||||
- code.icb4dc0.de/prskr/nurse:{{ .ShortCommit}}
|
||||
dockerfile: deployments/Dockerfile
|
||||
kos:
|
||||
- id: nurse
|
||||
build: nurse
|
||||
repository: code.icb4dc0.de/prskr
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
tags:
|
||||
- "latest"
|
||||
- "{{ .Tag }}"
|
||||
- "{{ .Major }}"
|
||||
- "{{ .ShortCommit}}"
|
||||
bare: true
|
||||
preserve_import_paths: false
|
||||
base_import_paths: true
|
||||
|
||||
gitea_urls:
|
||||
api: https://code.icb4dc0.de/api/v1
|
||||
|
|
Loading…
Reference in a new issue