File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change
1
+ # Ignore everything
2
+ *
Original file line number Diff line number Diff line change
1
+ FROM golang:1.19.8
2
+
3
+ # See https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt
4
+ # for the latest gh install instructions when the below didn't work
5
+
6
+ RUN type -p curl >/dev/null || (apt update && apt install curl -y)
7
+
8
+ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
9
+ && chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
10
+ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
11
+ && apt update \
12
+ && apt install gh -y
13
+
14
+ ARG HELM_DIFF_UID
15
+
16
+ RUN adduser \
17
+ --gecos "Helm Diff" \
18
+ --disabled-password \
19
+ -u "$HELM_DIFF_UID" \
20
+ helm-diff-releaser \
21
+ --shell /bin/sh
22
+
23
+ USER helm-diff-releaser
Original file line number Diff line number Diff line change @@ -54,11 +54,15 @@ docker-run-release:
54
54
# needed to avoid "failed to initialize build cache at /.cache/go-build: mkdir /.cache: permission denied"
55
55
mkdir -p docker-run-release-cache
56
56
# uid needs to be set to avoid "error obtaining VCS status: exit status 128"
57
- docker run --user $(shell id -u) -it --rm -e GITHUB_TOKEN \
57
+ # Also, there needs to be a valid Linux user with the uid in the container-
58
+ # otherwise git-push will fail.
59
+ docker build -t helm-diff-release -f Dockerfile.release \
60
+ --build-arg HELM_DIFF_UID=$(shell id -u) --load .
61
+ docker run -it --rm -e GITHUB_TOKEN \
58
62
-v ${SSH_AUTH_SOCK} :/tmp/ssh-agent.sock -e SSH_AUTH_SOCK=/tmp/ssh-agent.sock \
59
63
-v $(shell pwd) :$(pkg ) \
60
64
-v $(shell pwd) /docker-run-release-cache:/.cache \
61
- -w $(pkg ) golang:1.19.8 make bootstrap release
65
+ -w $(pkg ) helm-diff-release make bootstrap release
62
66
63
67
.PHONY : dist
64
68
dist : export COPYFILE_DISABLE=1 # teach OSX tar to not put ._* files in tar archive
You can’t perform that action at this time.
0 commit comments