Skip to content

Commit cd5d6df

Browse files
committed
add new post_upload_script input
1 parent 1ed1c91 commit cd5d6df

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ inputs:
2424
upload_directory:
2525
description: when enabled, uploads entire docker directory, useful for configuration files needed along the container
2626
required: false
27+
post_upload_script:
28+
description: sets command to run post upload, useful to fix permission issues in configuration files
29+
required: false
2730
docker_compose_directory:
2831
description: specifies which directory to upload, needed for upload_directory
2932
required: false

docker-entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ then
8585
fi
8686
tar cjvf - -C "$GITHUB_WORKSPACE" "$INPUT_DOCKER_COMPOSE_DIRECTORY" | ssh -o StrictHostKeyChecking=no "$INPUT_REMOTE_DOCKER_HOST" 'tar -xjvf -'
8787
echo "Upload finished"
88+
if [ -n "$INPUT_POST_UPLOAD_COMMAND" ];
89+
then
90+
echo "Upload post command specified, runnig. $INPUT_POST_UPLOAD_COMMAND "
91+
eval "$INPUT_POST_UPLOAD_COMMAND"
92+
fi
8893
fi
8994

9095
if [ -n "$INPUT_DOCKER_LOGIN_PASSWORD" ] || [ -n "$INPUT_DOCKER_LOGIN_USER" ] || [ -n "$INPUT_DOCKER_LOGIN_REGISTRY" ]; then

0 commit comments

Comments
 (0)