@@ -67,6 +67,10 @@ inputs:
67
67
description : " On restart-only true, Service will be force restarted with set replicas."
68
68
default : false
69
69
required : false
70
+ debug :
71
+ description : " Enable debug mode."
72
+ default : false
73
+ required : false
70
74
71
75
runs :
72
76
using : " composite"
@@ -100,11 +104,13 @@ runs:
100
104
101
105
- name : EC2 Docker Service Deploy
102
106
if : ${{ inputs.restart-only != 'true' }}
103
- uses : appleboy/ssh-action@master
107
+ uses : appleboy/ssh-action@v1.0.3
104
108
with :
105
109
host : ${{ inputs.ssh-host }}
106
110
username : ${{ inputs.ssh-username }}
107
111
key : ${{ inputs.ssh-key }}
112
+ debug : : ${{ inputs.debug }}
113
+ script_stop : true
108
114
script : |
109
115
sudo docker login --username AWS -p $(aws ecr get-login-password --region ${{ inputs.aws-region }}) ${{ steps.login-ecr.outputs.registry }}
110
116
sudo docker pull ${{ inputs.ecr-image-uri }}
@@ -127,11 +133,13 @@ runs:
127
133
128
134
- name : EC2 Docker Restart Service
129
135
if : ${{ inputs.restart-only == 'true' }}
130
- uses : appleboy/ssh-action@master
136
+ uses : appleboy/ssh-action@v1.0.3
131
137
with :
132
138
host : ${{ inputs.ssh-host }}
133
139
username : ${{ inputs.ssh-username }}
134
140
key : ${{ inputs.ssh-key }}
141
+ debug : : ${{ inputs.debug }}
142
+ script_stop : true
135
143
script : |
136
144
sudo docker login --username AWS -p $(aws ecr get-login-password --region ${{ inputs.aws-region }}) ${{ steps.login-ecr.outputs.registry }}
137
145
sudo docker pull ${{ inputs.ecr-image-uri }}
@@ -142,11 +150,13 @@ runs:
142
150
143
151
- name : EC2 Prune conatiner and images
144
152
if : ${{ inputs.prune == 'true' }}
145
- uses : appleboy/ssh-action@master
153
+ uses : appleboy/ssh-action@v1.0.3
146
154
with :
147
155
host : ${{ inputs.ssh-host }}
148
156
username : ${{ inputs.ssh-username }}
149
157
key : ${{ inputs.ssh-key }}
158
+ debug : : ${{ inputs.debug }}
159
+ script_stop : true
150
160
script : |
151
161
sudo -S docker container prune -f
152
162
sudo -S docker image prune -af
0 commit comments