File tree Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Expand file tree Collapse file tree 4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ RUN adduser \
13
13
--uid 10001 \
14
14
codefresh
15
15
16
- ARG GITHUB_TOKEN
17
- RUN git config \
16
+ RUN --mount=type=secret,id=GITHUB_TOKEN \
17
+ GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) \
18
+ git config \
18
19
--global \
19
20
url."https://github:${GITHUB_TOKEN}@github.com" .insteadOf \
20
21
"https://github.com"
Original file line number Diff line number Diff line change 1
- VERSION =v0.1.62
1
+ VERSION =v0.1.63
2
2
3
3
OUT_DIR =dist
4
4
YEAR? =$(shell date +"% Y")
Original file line number Diff line number Diff line change @@ -36,6 +36,15 @@ steps:
36
36
on :
37
37
- success
38
38
39
+ prepare_build_secrets :
40
+ stage : Prepare
41
+ title : ' Prepare build secrets'
42
+ image : alpine
43
+ commands :
44
+ - export GITHUB_TOKEN_PATH=${{CF_VOLUME_PATH}}/GITHUB_TOKEN
45
+ - cf_export GITHUB_TOKEN_PATH
46
+ - echo $GITHUB_TOKEN > $GITHUB_TOKEN_PATH
47
+
39
48
compare_versions :
40
49
stage : Prepare
41
50
title : compare versions
@@ -121,8 +130,9 @@ steps:
121
130
buildkit : true
122
131
disable_push : true
123
132
build_arguments :
124
- - GITHUB_TOKEN=${{GITHUB_TOKEN}}
125
133
- SEGMENT_WRITE_KEY=${{SEGMENT_WRITE_KEY}}
134
+ secrets :
135
+ - id=GITHUB_TOKEN,src=${{GITHUB_TOKEN_PATH}}
126
136
when :
127
137
condition :
128
138
all :
@@ -131,6 +141,9 @@ steps:
131
141
- name : compare_versions
132
142
on :
133
143
- success
144
+ - name : prepare_build_secrets
145
+ on :
146
+ - success
134
147
135
148
push_dev :
136
149
stage : Push Dev
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ cf version
23
23
24
24
``` bash
25
25
# download and extract the binary
26
- curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.62 /cf-linux-amd64.tar.gz | tar zx
26
+ curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.63 /cf-linux-amd64.tar.gz | tar zx
27
27
28
28
# move the binary to your $PATH
29
29
mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
36
36
37
37
``` bash
38
38
# download and extract the binary
39
- curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.62 /cf-darwin-amd64.tar.gz | tar zx
39
+ curl -L --output - https://github.com/codefresh-io/cli-v2/releases/download/v0.1.63 /cf-darwin-amd64.tar.gz | tar zx
40
40
41
41
# move the binary to your $PATH
42
42
mv ./cf-darwin-amd64 /usr/local/bin/cf
You can’t perform that action at this time.
0 commit comments