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 \
1313 --uid 10001 \
1414 codefresh
1515
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 \
1819 --global \
1920 url."https://github:${GITHUB_TOKEN}@github.com" .insteadOf \
2021 "https://github.com"
Original file line number Diff line number Diff line change 1- VERSION =v0.1.62
1+ VERSION =v0.1.63
22
33OUT_DIR =dist
44YEAR? =$(shell date +"% Y")
Original file line number Diff line number Diff line change @@ -36,6 +36,15 @@ steps:
3636 on :
3737 - success
3838
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+
3948 compare_versions :
4049 stage : Prepare
4150 title : compare versions
@@ -121,8 +130,9 @@ steps:
121130 buildkit : true
122131 disable_push : true
123132 build_arguments :
124- - GITHUB_TOKEN=${{GITHUB_TOKEN}}
125133 - SEGMENT_WRITE_KEY=${{SEGMENT_WRITE_KEY}}
134+ secrets :
135+ - id=GITHUB_TOKEN,src=${{GITHUB_TOKEN_PATH}}
126136 when :
127137 condition :
128138 all :
@@ -131,6 +141,9 @@ steps:
131141 - name : compare_versions
132142 on :
133143 - success
144+ - name : prepare_build_secrets
145+ on :
146+ - success
134147
135148 push_dev :
136149 stage : Push Dev
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ cf version
2323
2424``` bash
2525# 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
2727
2828# move the binary to your $PATH
2929mv ./cf-linux-amd64 /usr/local/bin/cf
@@ -36,7 +36,7 @@ cf version
3636
3737``` bash
3838# 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
4040
4141# move the binary to your $PATH
4242mv ./cf-darwin-amd64 /usr/local/bin/cf
You can’t perform that action at this time.
0 commit comments