Skip to content

Commit 2bdc005

Browse files
committed
Testing github
1 parent 2ffbd17 commit 2bdc005

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

examples/build/secrets/platforms-buildrunner.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ steps:
88
simple-build-step:
99
build:
1010
dockerfile: |
11-
FROM alpine:latest
11+
FROM busybox:latest
1212
# Using secrets inline (commented out since it fails in github actions)
1313
# RUN --mount=type=secret,id=secret1 \
1414
# --mount=type=secret,id=secret2 \
1515
# echo Using secrets in my build - secret1 file located at /run/secrets/secret1 with contents $(cat /run/secrets/secret1) and secret2=$(cat /run/secrets/secret2)
16-
# Using secrets in environment variables
1716
RUN --mount=type=secret,id=secret1 \
18-
--mount=type=secret,id=secret2 \
19-
SECRET1_FILE=/run/secrets/secret1 \
20-
SECRET2_VARIABLE=$(cat /run/secrets/secret2) \
21-
&& echo Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE
17+
--mount=type=secret,id=secret2 \
18+
sh -c ' \
19+
SECRET1_FILE=/run/secrets/secret1; \
20+
SECRET2_VARIABLE=$(cat /run/secrets/secret2); \
21+
echo "Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE" \
22+
'
2223
secrets:
2324
# Example of a secret that is a file
2425
- id=secret1,src=examples/build/secrets/secret1.txt

0 commit comments

Comments
 (0)