File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ inputs:
42
42
description : Image tag, e.g. latest. Will overwrite the tag latest tag on a push, and have no effect on a release.
43
43
required : false
44
44
45
+ # https://docs.docker.com/build/guide/build-args/
46
+ build_arg :
47
+ description : Additional build argument to be passed to the Dockerfile (e.g. NODE_AUTH_TOKEN=s3cr3t)
48
+ required : false
49
+ default : " FOO=bar"
50
+
45
51
runs :
46
52
using : " composite"
47
53
steps :
84
90
export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
85
91
export GITHUB_URL=https://github.com/${{ github.repository }}
86
92
87
- echo "::group::Building the Docker image: ${{ inputs.repository }}/${IMAGE_NAME}:${COMMIT_TAG} from ${{ inputs.dockerfile }} in ${{ inputs.context}} context ..."
93
+ echo "::group::Building the Docker image: ${{ inputs.repository }}/${IMAGE_NAME}:${COMMIT_TAG} from ${{ inputs.dockerfile }} in ${{ inputs.context }} context ..."
88
94
89
95
# https://docs.docker.com/develop/develop-images/build_enhancements/
90
96
# https://docs.docker.com/engine/reference/commandline/build/#specifying-external-cache-sources
97
103
--build-arg BUILD_DATE=${BUILD_DATE} \
98
104
--build-arg GITHUB_SHA=${GITHUB_SHA} \
99
105
\
106
+ --build-arg ${{ inputs.build_arg }} \
107
+ \
100
108
--tag ${{ inputs.repository }}/${IMAGE_NAME}:${COMMIT_TAG} \
101
109
--tag docker.io/${IMAGE_NAME}:${COMMIT_TAG} \
102
110
\
You can’t perform that action at this time.
0 commit comments