File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,12 @@ inputs:
4242 description : Image tag, e.g. latest. Will overwrite the tag latest tag on a push, and have no effect on a release.
4343 required : false
4444
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+
4551runs :
4652 using : " composite"
4753 steps :
8490 export BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
8591 export GITHUB_URL=https://github.com/${{ github.repository }}
8692
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 ..."
8894
8995 # https://docs.docker.com/develop/develop-images/build_enhancements/
9096 # https://docs.docker.com/engine/reference/commandline/build/#specifying-external-cache-sources
97103 --build-arg BUILD_DATE=${BUILD_DATE} \
98104 --build-arg GITHUB_SHA=${GITHUB_SHA} \
99105 \
106+ --build-arg ${{ inputs.build_arg }} \
107+ \
100108 --tag ${{ inputs.repository }}/${IMAGE_NAME}:${COMMIT_TAG} \
101109 --tag docker.io/${IMAGE_NAME}:${COMMIT_TAG} \
102110 \
You can’t perform that action at this time.
0 commit comments