Skip to content

Commit 2ffbd17

Browse files
committed
Fix failing github actions test
1 parent 8ab3eac commit 2ffbd17

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

README.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,16 +389,12 @@ In order to use secrets in buildrunner, you need to do the following:
389389
build:
390390
dockerfile: |
391391
FROM alpine:latest
392-
# Using secrets inline
393-
RUN --mount=type=secret,id=secret1 \
394-
--mount=type=secret,id=secret2 \
395-
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)"
396392
# Using secrets in environment variables
397393
RUN --mount=type=secret,id=secret1 \
398394
--mount=type=secret,id=secret2 \
399395
SECRET1_FILE=/run/secrets/secret1 \
400396
SECRET2_VARIABLE=$(cat /run/secrets/secret2) \
401-
&& echo "Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE"
397+
&& echo Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE
402398
secrets:
403399
# Example of a secret that is a file
404400
- id=secret1,src=examples/build/secrets/secret1.txt

examples/build/secrets/buildrunner.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ steps:
1313
# Using secrets inline
1414
RUN --mount=type=secret,id=secret1 \
1515
--mount=type=secret,id=secret2 \
16-
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+
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)
1717
# Using secrets in environment variables
1818
RUN --mount=type=secret,id=secret1 \
1919
--mount=type=secret,id=secret2 \
2020
SECRET1_FILE=/run/secrets/secret1 \
2121
SECRET2_VARIABLE=$(cat /run/secrets/secret2) \
22-
&& echo "Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE"
22+
&& echo Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE
2323
secrets:
2424
# Example of a secret that is a file
2525
- id=secret1,src=examples/build/secrets/secret1.txt

examples/build/secrets/platforms-buildrunner.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ steps:
99
build:
1010
dockerfile: |
1111
FROM alpine:latest
12-
# Using secrets inline
13-
RUN --mount=type=secret,id=secret1 \
14-
--mount=type=secret,id=secret2 \
15-
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)"
12+
# Using secrets inline (commented out since it fails in github actions)
13+
# RUN --mount=type=secret,id=secret1 \
14+
# --mount=type=secret,id=secret2 \
15+
# 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)
1616
# Using secrets in environment variables
1717
RUN --mount=type=secret,id=secret1 \
1818
--mount=type=secret,id=secret2 \
1919
SECRET1_FILE=/run/secrets/secret1 \
2020
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"
21+
&& echo Using secrets in my build - secret1 file located at $SECRET1_FILE with contents $(cat $SECRET1_FILE) and secret2=$SECRET2_VARIABLE
2222
secrets:
2323
# Example of a secret that is a file
2424
- id=secret1,src=examples/build/secrets/secret1.txt
2525
# Example of a secret that is an environment variable
2626
- id=secret2,env=SECRET2
2727
platforms:
2828
- linux/amd64
29-
- linux/arm64/v8
29+
- linux/arm64

0 commit comments

Comments
 (0)