mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-20 02:17:01 +00:00
feat: support to set an alternative image owner
This commit is contained in:
parent
84afe70659
commit
ea9659ce17
3 changed files with 10 additions and 8 deletions
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
|
|
@ -41,6 +41,7 @@ jobs:
|
||||||
- name: goreleaser
|
- name: goreleaser
|
||||||
run: |
|
run: |
|
||||||
echo "${{ github.token }}" | docker login https://ghcr.io -u ${GITHUB_ACTOR} --password-stdin
|
echo "${{ github.token }}" | docker login https://ghcr.io -u ${GITHUB_ACTOR} --password-stdin
|
||||||
make release
|
GITHUB_ACTOR=$(echo ${GITHUB_ACTOR} | tr '[:upper:]' '[:lower:]')
|
||||||
|
GIT_OWNER=${GITHUB_ACTOR} make release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ builds:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
- GOFLAGS = -mod=vendor
|
- GOFLAGS = -mod=vendor
|
||||||
- GO111MODULE = on
|
- GO111MODULE = on
|
||||||
|
- GIT_OWNER = yannh
|
||||||
goos:
|
goos:
|
||||||
- windows
|
- windows
|
||||||
- linux
|
- linux
|
||||||
|
|
@ -31,18 +32,18 @@ archives:
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- 'ghcr.io/yannh/kubeconform:latest'
|
- 'ghcr.io/{{.Env.GIT_OWNER}}/kubeconform:latest'
|
||||||
- 'ghcr.io/yannh/kubeconform:{{ .Tag }}'
|
- 'ghcr.io/{{.Env.GIT_OWNER}}/kubeconform:{{ .Tag }}'
|
||||||
- 'ghcr.io/yannh/kubeconform:{{ .Tag }}-amd64'
|
- 'ghcr.io/{{.Env.GIT_OWNER}}/kubeconform:{{ .Tag }}-amd64'
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--platform=linux/amd64"
|
- "--platform=linux/amd64"
|
||||||
goos: linux
|
goos: linux
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
- image_templates:
|
- image_templates:
|
||||||
- 'ghcr.io/yannh/kubeconform:latest-alpine'
|
- 'ghcr.io/{{.Env.GIT_OWNER}}/kubeconform:latest-alpine'
|
||||||
- 'ghcr.io/yannh/kubeconform:{{ .Tag }}-alpine'
|
- 'ghcr.io/{{.Env.GIT_OWNER}}/kubeconform:{{ .Tag }}-alpine'
|
||||||
- 'ghcr.io/yannh/kubeconform:{{ .Tag }}-amd64-alpine'
|
- 'ghcr.io/{{.Env.GIT_OWNER}}/kubeconform:{{ .Tag }}-amd64-alpine'
|
||||||
dockerfile: Dockerfile-alpine
|
dockerfile: Dockerfile-alpine
|
||||||
build_flag_templates:
|
build_flag_templates:
|
||||||
- "--platform=linux/amd64"
|
- "--platform=linux/amd64"
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -35,7 +35,7 @@ goreleaser-build-static:
|
||||||
cp dist/kubeconform_linux_amd64_v1/kubeconform bin/
|
cp dist/kubeconform_linux_amd64_v1/kubeconform bin/
|
||||||
|
|
||||||
release:
|
release:
|
||||||
docker run -e GITHUB_TOKEN -t -v /var/run/docker.sock:/var/run/docker.sock -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform goreleaser/goreleaser:v1.11.5 release --rm-dist
|
docker run -e GITHUB_TOKEN -e GIT_OWNER -t -v /var/run/docker.sock:/var/run/docker.sock -v $$PWD:/go/src/github.com/yannh/kubeconform -w /go/src/github.com/yannh/kubeconform goreleaser/goreleaser:v1.11.5 release --rm-dist
|
||||||
|
|
||||||
update-deps:
|
update-deps:
|
||||||
go get -u ./...
|
go get -u ./...
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue