File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,10 +14,15 @@ inputs:
1414 description : ' Redis port to use and expose'
1515 required : false
1616 default : 6379
17+ redis-container-name :
18+ description : " Name of the created container. Useful if you run multiple Redis containers"
19+ required : false
20+ default : ' redis'
1721
1822runs :
1923 using : ' docker'
2024 image : ' Dockerfile'
2125 args :
2226 - ${{ inputs.redis-version }}
2327 - ${{ inputs.redis-port }}
28+ - ${{ inputs.redis-container-name }}
Original file line number Diff line number Diff line change 22
33REDIS_VERSION=$1
44REDIS_PORT=$2
5+ REDIS_CONTAINER_NAME=$3
56
67if [ -z " $REDIS_VERSION " ]; then
78 echo " Missing Redis version in the [redis-version] input. Received value: $REDIS_VERSION "
@@ -10,4 +11,4 @@ if [ -z "$REDIS_VERSION" ]; then
1011fi
1112
1213echo " Starting single-node Redis instance"
13- docker run --name redis --publish $REDIS_PORT :6379 --detach redis:$REDIS_VERSION
14+ docker run --name $REDIS_CONTAINER_NAME --publish $REDIS_PORT :6379 --detach redis:$REDIS_VERSION
You can’t perform that action at this time.
0 commit comments