Skip to content

Commit

Permalink
add vhost name
Browse files Browse the repository at this point in the history
  • Loading branch information
getong committed Dec 28, 2019
1 parent 25dfd0c commit 54e5c7b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ See [action.yml](action.yml)
Basic:
```yaml
steps:
- uses: getong/rabbitmq-action@v1.1
- uses: getong/rabbitmq-action@v1.2
with:
rabbitmq version: '3.8.2-management-alpine'
host port: 5672
rabbitmq user: 'user'
rabbitmq password: 'noBahC3e'
rabbitmq vhost: 'vhost_name'
```
# License
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
description: 'the rabbitmq password'
required: false
default: ''
rabbitmq vhost:
description: 'the rabbitmq vhost option'
required: false
default: ''
runs:
using: 'docker'
image: 'Dockerfile'
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

docker_run="docker run"
docker_run="$docker_run -d -p $INPUT_HOST_PORT:5672 -e RABBITMQ_DEFAULT_USER=$INPUT_RABBITMQ_USER -e RABBITMQ_DEFAULT_PASS=$INPUT_RABBITMQ_PASSWORD rabbitmq:$INPUT_RABBITMQ_VERSION"
docker_run="$docker_run -d -p $INPUT_HOST_PORT:5672 -e RABBITMQ_DEFAULT_USER=$INPUT_RABBITMQ_USER -e RABBITMQ_DEFAULT_PASS=$INPUT_RABBITMQ_PASSWORD -e RABBITMQ_DEFAULT_VHOST=$INPUT_RABBITMQ_VHOST rabbitmq:$INPUT_RABBITMQ_VERSION"

sh -c "$docker_run"

0 comments on commit 54e5c7b

Please sign in to comment.