-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds compose v2 and v1 support #26
Open
gonzalochief
wants to merge
14
commits into
wshihadeh:master
Choose a base branch
from
gonzalochief:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
49f425f
Update docker-entrypoint.sh
gonzalochief bc72c4c
Update main.yml
gonzalochief 1cb5b89
Update docker command to be compliant with v2.0.1
gonzalochief 45033bf
Add version input
gonzalochief 7b9f530
set default
gonzalochief e41364c
Allows to make v1 and v2 calls to compose
gonzalochief f3e04ad
Update action.yml
gonzalochief d3f1669
Update action.yml
gonzalochief bc34087
Update action.yml
gonzalochief 506c43e
Update action.yml
gonzalochief 7cce44e
Update docker-entrypoint.sh
gonzalochief ba9e61e
Update docker-entrypoint.sh
gonzalochief 9613c5d
Update docker-entrypoint.sh
gonzalochief d4f5455
Update README.md
gonzalochief File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
with: | ||
fetch-depth: 1 | ||
- name: Start Deployment | ||
uses: wshihadeh/docker-deployment-action@master | ||
uses: gonzalochief/docker-deployment-action@master | ||
with: | ||
remote_docker_host: ${{ secrets.HOST }} | ||
ssh_private_key: ${{ secrets.PRIVATE_KEY }} | ||
|
@@ -29,7 +29,7 @@ jobs: | |
args: -p test up -d | ||
|
||
- name: Start Deployment without copy | ||
uses: wshihadeh/docker-deployment-action@master | ||
uses: gonzalochief/docker-deployment-action@master | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To test the fork |
||
with: | ||
remote_docker_host: ${{ secrets.HOST }} | ||
ssh_private_key: ${{ secrets.PRIVATE_KEY }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -49,6 +49,7 @@ fi | |||||||||||||||||||||||||
|
||||||||||||||||||||||||||
STACK_FILE=${INPUT_STACK_FILE_NAME} | ||||||||||||||||||||||||||
DEPLOYMENT_COMMAND_OPTIONS="" | ||||||||||||||||||||||||||
DOCKER_COMP_COMMAND="" | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if [ "$INPUT_COPY_STACK_FILE" == "true" ]; then | ||||||||||||||||||||||||||
|
@@ -57,6 +58,15 @@ else | |||||||||||||||||||||||||
DEPLOYMENT_COMMAND_OPTIONS=" --log-level debug --host ssh://$INPUT_REMOTE_DOCKER_HOST:$INPUT_REMOTE_DOCKER_PORT" | ||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if [ "$INPUT_DEPLOYMENT_MODE" == "docker-compose" ] && [ "$INPUT_DOCKER_COMPOSE_VER" == "v2" ]; then | ||||||||||||||||||||||||||
DOCKER_COMP_COMMAND="docker compose" | ||||||||||||||||||||||||||
elif [ "$INPUT_DEPLOYMENT_MODE" == "docker-compose" ] && [ "$INPUT_DOCKER_COMPOSE_VER" == "v1" ]; then | ||||||||||||||||||||||||||
DOCKER_COMP_COMMAND="docker-compose" | ||||||||||||||||||||||||||
else | ||||||||||||||||||||||||||
DOCKER_COMP_COMMAND="docker compose" | ||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
Comment on lines
+61
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||
case $INPUT_DEPLOYMENT_MODE in | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
docker-swarm) | ||||||||||||||||||||||||||
|
@@ -65,7 +75,7 @@ case $INPUT_DEPLOYMENT_MODE in | |||||||||||||||||||||||||
|
||||||||||||||||||||||||||
*) | ||||||||||||||||||||||||||
INPUT_DEPLOYMENT_MODE="docker-compose" | ||||||||||||||||||||||||||
DEPLOYMENT_COMMAND="docker-compose $DEPLOYMENT_COMMAND_OPTIONS -f $STACK_FILE" | ||||||||||||||||||||||||||
DEPLOYMENT_COMMAND="$DOCKER_COMP_COMMAND $DEPLOYMENT_COMMAND_OPTIONS -f $STACK_FILE" | ||||||||||||||||||||||||||
;; | ||||||||||||||||||||||||||
esac | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
|
@@ -102,7 +112,7 @@ if ! [ -z "$INPUT_COPY_STACK_FILE" ] && [ $INPUT_COPY_STACK_FILE = 'true' ] ; th | |||||||||||||||||||||||||
execute_ssh "ls -t $INPUT_DEPLOY_PATH/stacks/docker-stack-* 2>/dev/null | tail -n +$INPUT_KEEP_FILES | xargs rm -- 2>/dev/null || true" | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if ! [ -z "$INPUT_PULL_IMAGES_FIRST" ] && [ $INPUT_PULL_IMAGES_FIRST = 'true' ] && [ $INPUT_DEPLOYMENT_MODE = 'docker-compose' ] ; then | ||||||||||||||||||||||||||
execute_ssh "${DEPLOYMENT_COMMAND} pull" | ||||||||||||||||||||||||||
execute_ssh ${DEPLOYMENT_COMMAND} "pull" | ||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
if ! [ -z "$INPUT_PRE_DEPLOYMENT_COMMAND_ARGS" ] && [ $INPUT_DEPLOYMENT_MODE = 'docker-compose' ] ; then | ||||||||||||||||||||||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To test the fork
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please reset this and push it again?