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: action.yml
+12-8
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,9 @@ inputs:
14
14
description: 'Endpoint of your Docker instance (xxxxxx.stackhero-network.com or your customized domain)'
15
15
required: true
16
16
17
-
dockerComposeFile:
18
-
description: 'Docker Compose file (e.g. "docker-compose.yml" or "docker/docker-compose.yml")'
17
+
deployment_command:
18
+
description: 'Command to run on deployment. This is useful to customize the Docker Compose command.'
19
19
required: false
20
-
default: 'docker-compose.yml'
21
20
22
21
runs:
23
22
using: "composite"
@@ -69,9 +68,14 @@ runs:
69
68
git fetch --unshallow origin
70
69
printenv > env.list
71
70
docker context use ${{ inputs.endpoint }}
72
-
if [ ! -f "${{ inputs.dockerComposeFile }}"" ]
71
+
if [ "${{ inputs.deployment_command }}" = "" ]
73
72
then
74
-
echo "::error::Can't find the Docker Compose file \"${{ inputs.dockerComposeFile }}\"."
75
-
exit 1
76
-
fi
77
-
docker compose --env-file env.list --file ${{ inputs.dockerComposeFile }} up -d
73
+
if [ ! -f "docker-compose.yml" ]
74
+
then
75
+
echo "::error::The \"docker-compose.yml\" file doesn't exist. You should ensure this file is at the root of your repository. If this file is in another directory, you should consider using the \"deployment_command\" input to customize the deployment command. You'll find more informations on Stackhero's documentation."
0 commit comments