File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ and work path.
4848| extra_args | Extra arguments for docker run command. | ` false ` | |
4949| pre-warm | Run a warming-up container (which might crash due to first time use failure) | ` false ` | true |
5050| pre-warm-cmd | Pre warm command to run inside the container | ` false ` | echo "warming up!" |
51+ | registry_authentication | Enable authentication on the registry server | ` false ` | ` false `
52+ | registry_username | Registry server username | ` false `
53+ | registry_token | Registry server token | ` false `
54+ | registry_repository | Registry server repository | ` false `
5155
5256
5357
Original file line number Diff line number Diff line change @@ -45,7 +45,19 @@ inputs:
4545 description : ' Pre warm command to run inside the container'
4646 required : false
4747 default : ' echo "warming up!"'
48-
48+ registry_authentication :
49+ description : ' Authenticate against registry server'
50+ required : false
51+ default : ' false'
52+ registry_username :
53+ description : ' Docker registry username.'
54+ required : false
55+ registry_token :
56+ description : ' Docker registry token'
57+ required : false
58+ registry_repository :
59+ description : ' Docker registry repository'
60+ required : false
4961
5062runs :
5163 using : " composite"
6274 ${{github.action_path}}/src/parse_input_paths.ps1 -githubWorkSpace "${{ github.workspace }}" -workspacePath "@${{ inputs.workspace_path }}" -mappingPath "@${{ inputs.mapping_path }}" -workPath "@${{ inputs.work_path }}";
6375 ${{github.action_path}}/src/parse_input_extra_args.ps1 -envNames "@${{ inputs.env_names }}" -entryPoint "@${{ inputs.entrypoint }}" -extraArgs "@${{ inputs.extra_args }}";
6476 shell : powershell
77+ - name : docker_login
78+ id : docker_login
79+ if : inputs.registry_authentication == 'true'
80+ shell : powershell
81+ run : >-
82+ docker login ${{ inputs.registry_repository }} -u ${{ inputs.registry_username }} -p ${{ inputs.registry_token }}
6583 - name : Pre-warm
6684 if : inputs.pre-warm == 'true'
6785 run : |
84102 ${{ inputs.run }}
85103 }
86104 shell : powershell
105+ - name : docker_logout
106+ id : docker_logout
107+ if : inputs.registry_authentication == 'true'
108+ shell : powershell
109+ run : >-
110+ docker logout ${{ inputs.registry_repository }}
You can’t perform that action at this time.
0 commit comments