Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Upate release to use docker login in DinD #3517

Merged
merged 1 commit into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Run GoReleaser within Docker
id: run-goreleaser
run: |
make release
make release-ci
- name: Generate SLSA subjects for provenance
id: hash
run: |
Expand Down
19 changes: 18 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ GOLANG_VERSION := 1.18.3
GORELEASER_CONFIG = release/tag/goreleaser.yaml
GORELEASER_IMAGE := ghcr.io/goreleaser/goreleaser-cross:v$(GOLANG_VERSION)

.PHONY: docs license fix vet fmt lint test build tidy release
.PHONY: docs license fix vet fmt lint test build tidy release release-ci

GOBIN := $(shell go env GOPATH)/bin
GIT_COMMIT := $(shell git rev-parse --short HEAD)
Expand Down Expand Up @@ -177,3 +177,20 @@ release:
$(GORELEASER_IMAGE) \
-f "$(GORELEASER_CONFIG)" release \
--skip-validate

release-ci:
@if [ ! -f ".release-env" ]; then \
echo "\033[91m.release-env is required for release\033[0m";\
exit 1;\
fi
docker run \
--rm \
--privileged \
--env-file .release-env \
-v ${HOME}/.docker/config.json:/root/.docker/config.json \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/github.com/GoogleContainerTools/kpt \
-w /go/src/github.com/GoogleContainerTools/kpt \
$(GORELEASER_IMAGE) \
-f "$(GORELEASER_CONFIG)" release \
--skip-validate