File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ GitHub Action and Docker image used to deploy a Docker stack on a Docker Swarm.
3838| ` stack_param ` | ` STACK_PARAM ` | Additional parameter (env var) to be passed to the stack. | | |
3939| ` env_file ` | ` ENV_FILE ` | Additional environment variables to be passed to the stack. | | |
4040| ` debug ` | ` DEBUG ` | Verbose logging | | ** 0** |
41+ | ` scale_after ` | ` SCALE_AFTER ` | Scale a service after a deployment has converged successfully. Example: servicename=1 | | |
4142
4243
4344## Using the GitHub Action
Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ inputs:
5353 description : " Debug information"
5454 required : false
5555 default : " 0"
56+ scale_after :
57+ description : " Service to scale after successful deploy (example: servicename=1)"
58+ default : " "
5659runs :
5760 using : ' docker'
5861 image : ' docker://ghcr.io/kitconcept/docker-stack-deploy:latest'
7073 STACK_PARAM : ${{ inputs.stack_param }}
7174 ENV_FILE : ${{ inputs.env_file }}
7275 DEBUG : ${{ inputs.debug }}
76+ SCALE_AFTER : ${{ inputs.scale_after }}
Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ check_deploy() {
6969 /stack-wait.sh -t " ${DEPLOY_TIMEOUT} " " ${STACK_NAME} "
7070}
7171
72+ scale_after () {
73+ if [[ -n " $SCALE_AFTER " ]]; then
74+ echo " Scaling services: $SCALE_AFTER "
75+ docker service scale $SCALE_AFTER
76+ fi
77+ }
78+
7279[ -z ${DEBUG+x} ] && export DEBUG=" 0"
7380
7481# ADDITIONAL ENV VARIABLES
182189 echo " Deploy: Failed"
183190 exit 1
184191fi
192+
193+ scale_after
You can’t perform that action at this time.
0 commit comments