Compare commits
1 Commits
dd9b8f1ebe
...
154574f731
Author | SHA1 | Date | |
---|---|---|---|
154574f731 |
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
bin
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
docker-hub-description-updater
|
/bin
|
||||||
coverage.txt
|
/dhd
|
||||||
dist
|
|
||||||
|
**/bindata*.go
|
175
.goreleaser.yaml
175
.goreleaser.yaml
@ -1,175 +0,0 @@
|
|||||||
project_name: docker-hub-description-updater
|
|
||||||
|
|
||||||
archives:
|
|
||||||
- formats: [ "tar.xz" ]
|
|
||||||
files:
|
|
||||||
- README.md
|
|
||||||
- LICENSE
|
|
||||||
|
|
||||||
before:
|
|
||||||
hooks:
|
|
||||||
- go mod tidy
|
|
||||||
|
|
||||||
builds:
|
|
||||||
- main: main.go
|
|
||||||
binary: >-
|
|
||||||
{{ .ProjectName }}-
|
|
||||||
{{- .Version }}-
|
|
||||||
{{- .Os }}-
|
|
||||||
{{- if eq .Arch "amd64" }}amd64
|
|
||||||
{{- else if eq .Arch "amd64_v1" }}amd64
|
|
||||||
{{- else }}{{ .Arch }}{{ end }}
|
|
||||||
{{- if .Arm }}-{{ .Arm }}{{ end }}
|
|
||||||
env:
|
|
||||||
- CGO_ENABLED=0
|
|
||||||
- GONOSUMDB={{ .Env.GONOSUMDB }}
|
|
||||||
- GOPROXY={{ .Env.GOPROXY }}
|
|
||||||
goos:
|
|
||||||
- linux
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
- arm
|
|
||||||
- arm64
|
|
||||||
- riscv64
|
|
||||||
goarm:
|
|
||||||
- "6"
|
|
||||||
- "7"
|
|
||||||
flags:
|
|
||||||
- -trimpath
|
|
||||||
ldflags:
|
|
||||||
- -s -w -X 'main.version={{ trimprefix .Tag "v" }}'
|
|
||||||
|
|
||||||
changelog:
|
|
||||||
filters:
|
|
||||||
exclude:
|
|
||||||
- '^chore'
|
|
||||||
- '^docs'
|
|
||||||
- '^test'
|
|
||||||
- Merge pull request
|
|
||||||
- Merge branch
|
|
||||||
- go mod tidy
|
|
||||||
format: "{{.SHA}}: {{.Message}} (@{{.AuthorUsername}})"
|
|
||||||
groups:
|
|
||||||
- title: Features
|
|
||||||
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
|
|
||||||
order: 0
|
|
||||||
- title: "Bug fixes"
|
|
||||||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
|
|
||||||
order: 1
|
|
||||||
- title: Others
|
|
||||||
order: 999
|
|
||||||
sort: asc
|
|
||||||
use: git
|
|
||||||
|
|
||||||
dockers:
|
|
||||||
- build_flag_templates:
|
|
||||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
|
||||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
|
||||||
- --label=org.opencontainers.image.source={{ .GitURL }}
|
|
||||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
|
||||||
- --platform=linux/amd64
|
|
||||||
- --pull
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
goarch: amd64
|
|
||||||
goos: linux
|
|
||||||
image_templates:
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
|
|
||||||
skip_push: false
|
|
||||||
use: buildx
|
|
||||||
|
|
||||||
- build_flag_templates:
|
|
||||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
|
||||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
|
||||||
- --label=org.opencontainers.image.source={{ .GitURL }}
|
|
||||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
|
||||||
- --platform=linux/arm/v6
|
|
||||||
- --pull
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
goarch: arm
|
|
||||||
goarm: "6"
|
|
||||||
goos: linux
|
|
||||||
image_templates:
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
|
|
||||||
skip_push: false
|
|
||||||
use: buildx
|
|
||||||
|
|
||||||
- build_flag_templates:
|
|
||||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
|
||||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
|
||||||
- --label=org.opencontainers.image.source={{ .GitURL }}
|
|
||||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
|
||||||
- --platform=linux/arm/v7
|
|
||||||
- --pull
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
goarch: arm
|
|
||||||
goarm: "7"
|
|
||||||
goos: linux
|
|
||||||
image_templates:
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
|
|
||||||
skip_push: false
|
|
||||||
use: buildx
|
|
||||||
|
|
||||||
- build_flag_templates:
|
|
||||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
|
||||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
|
||||||
- --label=org.opencontainers.image.source={{ .GitURL }}
|
|
||||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
|
||||||
- --platform=linux/arm64
|
|
||||||
- --pull
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
goarch: arm64
|
|
||||||
goos: linux
|
|
||||||
image_templates:
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
|
|
||||||
skip_push: false
|
|
||||||
use: buildx
|
|
||||||
|
|
||||||
- build_flag_templates:
|
|
||||||
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
|
||||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.documentation={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
|
||||||
- --label=org.opencontainers.image.source={{ .GitURL }}
|
|
||||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.url=https://git.cryptic.systems/volker.raschek/{{ .ProjectName }}
|
|
||||||
- --label=org.opencontainers.image.version={{ trimprefix .Tag "v" }}
|
|
||||||
- --platform=linux/riscv64
|
|
||||||
- --pull
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
goarch: riscv64
|
|
||||||
goos: linux
|
|
||||||
image_templates:
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
|
|
||||||
skip_push: false
|
|
||||||
use: buildx
|
|
||||||
|
|
||||||
docker_manifests:
|
|
||||||
- name_template: 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}'
|
|
||||||
image_templates:
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-amd64'
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v6'
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm-v7'
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-arm64'
|
|
||||||
- 'git.cryptic.systems/volker.raschek/{{ .ProjectName }}:{{ trimprefix .Tag "v" }}-riscv64'
|
|
||||||
|
|
||||||
gitea_urls:
|
|
||||||
api: https://git.cryptic.systems/api/v1
|
|
||||||
download: https://git.cryptic.systems
|
|
||||||
|
|
||||||
version: 2
|
|
24
Dockerfile
24
Dockerfile
@ -1,5 +1,23 @@
|
|||||||
FROM scratch AS build
|
# ARGs
|
||||||
|
# ==================================
|
||||||
|
ARG BASE_IMAGE
|
||||||
|
ARG BUILD_IMAGE
|
||||||
|
ARG EXECUTABLE_TARGET
|
||||||
|
ARG GOPROXY
|
||||||
|
ARG GOPRIVATE
|
||||||
|
ARG VERSION
|
||||||
|
|
||||||
COPY docker-hub-description-updater-* /usr/bin/docker-hub-description-updater
|
# BUILD
|
||||||
|
# ==============================================================================
|
||||||
|
FROM ${BUILD_IMAGE} AS build-env
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/bin/docker-hub-description-updater" ]
|
ADD ./ /workspace
|
||||||
|
|
||||||
|
RUN make clean ${EXECUTABLE_TARGET} GOPROXY=${GOPROXY}
|
||||||
|
|
||||||
|
# TARGET
|
||||||
|
# ==============================================================================
|
||||||
|
FROM ${BASE_IMAGE}
|
||||||
|
COPY --from=build-env /workspace/${EXECUTABLE_TARGET} /usr/bin/dhdu
|
||||||
|
RUN chmod +x /usr/bin/dhdu
|
||||||
|
ENTRYPOINT [ "/usr/bin/dhdu" ]
|
4
go.sum
4
go.sum
@ -18,10 +18,14 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An
|
|||||||
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
||||||
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
|
github.com/stretchr/testify v1.3.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||||
|
github.com/stretchr/testify v1.3.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
gopkg.in/yaml.v2 v2.2.1 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||||
|
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
Loading…
x
Reference in New Issue
Block a user