File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 1313 type : string
1414 registry :
1515 description : ' Docker registry URL'
16- required : true
16+ required : false
1717 type : string
18+ default : ' registry.mconf.com'
1819 dockerfile_path :
1920 description : ' Path to Dockerfile'
2021 required : false
3031 type : string
3132 required : false
3233 default : ' '
34+ context_path :
35+ description : ' Path to build context directory'
36+ type : string
37+ required : false
38+ default : ' .'
39+ build_target :
40+ description : ' Docker build target stage for multi-stage builds'
41+ type : string
42+ required : false
43+ default : ' '
3344 push_enabled :
3445 description : ' Enable pushing to registry (default: auto-detect tags)'
3546 type : boolean
7788 name : Build, Push and Scan Docker
7889 runs-on : ${{ fromJSON(inputs.runs-on) }}
7990 timeout-minutes : 30
91+ outputs :
92+ image_digest : ${{ steps.build.outputs.digest }}
93+ image_tags : ${{ steps.meta.outputs.tags }}
8094 env :
8195 DOCKERHUB_USERNAME : ${{ secrets.DOCKERHUB_USERNAME }}
8296 DOCKERHUB_PASSWORD : ${{ secrets.DOCKERHUB_PASSWORD }}
@@ -138,8 +152,9 @@ jobs:
138152 id : build
139153 uses : docker/build-push-action@v5
140154 with :
141- context : .
155+ context : ${{ inputs.context_path }}
142156 file : ${{ inputs.dockerfile_path }}
157+ target : ${{ inputs.build_target }}
143158 ssh : ${{ env.SSH_PRIVATE_KEY != '' && format('default={0}', env.SSH_AUTH_SOCK) || '' }}
144159 push : ${{ env.PUSH_ENABLED == 'true' }}
145160 load : ${{ env.SCAN_ENABLED == 'true' }}
You can’t perform that action at this time.
0 commit comments