Skip to content

Commit 90c206d

Browse files
committed
refinements
1 parent f21a04d commit 90c206d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ jobs:
146146
```
147147

148148

149-
### Remove container when exit
150-
Starting in v1.6.0, when running this action on a self-hosted runner, it’s helpful to remove the container so its name won’t conflict:
149+
### Using Authentication
150+
Starting in v1.7.0, You can start the Redis with Authentication using the `redis-password` input:
151151

152152
```yaml
153153
name: Run tests
@@ -166,14 +166,14 @@ jobs:
166166
uses: supercharge/[email protected]
167167
with:
168168
redis-version: ${{ matrix.redis-version }}
169-
redis-remove-container: true # false by default
169+
redis-password: 'password'
170170
171171
- name: …
172172
```
173173

174174

175-
### Using Authentication
176-
Starting in v1.7.0, You can start the Redis with Authentication using the `redis-password` input:
175+
### Remove Docker Container on Exit
176+
Starting in v1.9.0, when running this action on a self-hosted runner, it’s helpful to remove the container so its name won’t conflict:
177177

178178
```yaml
179179
name: Run tests
@@ -192,7 +192,7 @@ jobs:
192192
uses: supercharge/[email protected]
193193
with:
194194
redis-version: ${{ matrix.redis-version }}
195-
redis-password: 'password'
195+
redis-remove-container-on-exit: true # false by default
196196
197197
- name: …
198198
```

action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
redis-port:
1818
description: 'Redis port to use and expose'
1919
required: false
20-
default: 6379
20+
default: "6379"
2121
redis-password:
2222
description: "Redis password to use"
2323
required: false
@@ -26,11 +26,11 @@ inputs:
2626
description: "Name of the created container. Useful if you run multiple Redis containers"
2727
required: false
2828
default: 'redis'
29-
redis-remove-container:
29+
redis-remove-container-on-exit:
3030
description: "Remove container after container exit?"
3131
required: false
3232
type: boolean
33-
default: false
33+
default: "false"
3434

3535
runs:
3636
using: 'docker'
@@ -41,4 +41,4 @@ runs:
4141
- ${{ inputs.redis-port }}
4242
- ${{ inputs.redis-password }}
4343
- ${{ inputs.redis-container-name }}
44-
- ${{ inputs.redis-remove-container }}
44+
- ${{ inputs.redis-remove-container-on-exit }}

start-redis.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ REDIS_VERSION=$2
55
REDIS_PORT=$3
66
REDIS_PASSWORD=$4
77
REDIS_CONTAINER_NAME=$5
8-
REDIS_REMOVE_CONTAINER=$6
8+
REDIS_REMOVE_CONTAINER_ON_EXIT=$6
99

1010
# 🛡️ Default version fallback
1111
if [ -z "$REDIS_VERSION" ]; then
@@ -18,7 +18,7 @@ fi
1818
DOCKER_RUN_ARGS="--name $REDIS_CONTAINER_NAME --publish $REDIS_PORT:6379 --detach"
1919

2020
# 🗑️ If remove flag is true, run container with --rm (auto-remove on exit)
21-
if [ "$REDIS_REMOVE_CONTAINER" = "true" ]; then
21+
if [ "$REDIS_REMOVE_CONTAINER_ON_EXIT" = "true" ]; then
2222
DOCKER_RUN_ARGS="--rm $DOCKER_RUN_ARGS"
2323
fi
2424

0 commit comments

Comments
 (0)