You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .github/workflows/docker_container_deploy.yml
+16-6
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,21 @@ jobs:
27
27
username: ${{ secrets.DROPLET_USERNAME }}
28
28
key: ${{ secrets.DROPLET_KEY }}
29
29
script: |
30
-
docker container ls -q --filter name=trumpee-${{ env.lowercase_repo_name }}:${{ github.event.inputs.image_tag }} > /tmp/current_container_id || true # Get the container ID if it exists
31
-
if [ -s /tmp/current_container_id ]; then # Check if previous container exists and is running
32
-
docker stop $(cat /tmp/current_container_id) || true # Stop the old container
33
-
docker rm $(cat /tmp/current_container_id) || true # Remove the old container
30
+
# Check if previous container exists and is running (based on name)
0 commit comments