From 0bc8516b2a497a7530f5fcd005a4e54d0865c04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20P=C3=B6hls?= Date: Tue, 12 Dec 2023 04:59:46 +0100 Subject: [PATCH 1/5] add steps on how to create a new release for my future self --- docs/new-release.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/new-release.md diff --git a/docs/new-release.md b/docs/new-release.md new file mode 100644 index 0000000..64571a0 --- /dev/null +++ b/docs/new-release.md @@ -0,0 +1,8 @@ +# Create a new Release +This document contains notes for my future self on how to tag a new release for this package. + +1. run [`release-it`](https://github.com/release-it/release-it) on the local command line +2. select the release version, create a tag, push changes, and don’t create an NPM release if `release-it` is asking for it +3. go to GitHub’s release page for this [redis-github-action](https://github.com/supercharge/redis-github-action/releases) and click the "Draft a new release" button +4. select the previously created tag and use the same tag version as the release title +5. that’s it From f7760cc24858b9062190a8f7cbfe96d2a6857e74 Mon Sep 17 00:00:00 2001 From: Dhaval Gojiya Date: Sun, 14 Sep 2025 19:49:27 +0530 Subject: [PATCH 2/5] [FIX] - Correct '--rm' argument placement in docker run (#26) - Fixes issue #26 where the '--rm' flag was applied after the image argument. - Adds a new CI workflow 'container-remove-flag.yml' to test this scenario. --- .github/workflows/container-remove-flag.yml | 21 +++++++++++++++++++++ start-redis.sh | 15 +++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/container-remove-flag.yml diff --git a/.github/workflows/container-remove-flag.yml b/.github/workflows/container-remove-flag.yml new file mode 100644 index 0000000..1e70c6c --- /dev/null +++ b/.github/workflows/container-remove-flag.yml @@ -0,0 +1,21 @@ +name: Start Redis server with remove container flag + +on: [push, pull_request] + +jobs: + redis-action: + runs-on: ubuntu-latest + strategy: + matrix: + redis-version: [5, 6, 7] + + name: Start Redis Server v${{ matrix.redis-version }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Start Redis Server + uses: ./ + with: + redis-version: ${{ matrix.redis-version }} + redis-remove-container: true # false by default diff --git a/start-redis.sh b/start-redis.sh index 0ace416..907ed3a 100755 --- a/start-redis.sh +++ b/start-redis.sh @@ -7,21 +7,28 @@ REDIS_PASSWORD=$4 REDIS_CONTAINER_NAME=$5 REDIS_REMOVE_CONTAINER=$6 +# 🛡️ Default version fallback if [ -z "$REDIS_VERSION" ]; then echo "Missing Redis version in the [redis-version] input. Received value: $REDIS_VERSION" echo "Falling back to Redis version [latest]" REDIS_VERSION='latest' fi -DOCKER_RUN_ARGS="--name $REDIS_CONTAINER_NAME --publish $REDIS_PORT:6379 --detach $REDIS_IMAGE:$REDIS_VERSION" +# 🛠️ Build docker run args +DOCKER_RUN_ARGS="--name $REDIS_CONTAINER_NAME --publish $REDIS_PORT:6379 --detach" -if [ "$REDIS_REMOVE_CONTAINER" == "true" ]; then - DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS --rm" +# 🗑️ If remove flag is true, run container with --rm (auto-remove on exit) +if [ "$REDIS_REMOVE_CONTAINER" = "true" ]; then + DOCKER_RUN_ARGS="--rm $DOCKER_RUN_ARGS" fi +# 🔐 Add password if provided if [ -n "$REDIS_PASSWORD" ]; then - DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS redis-server --requirepass $REDIS_PASSWORD" + DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS $REDIS_IMAGE:$REDIS_VERSION redis-server --requirepass $REDIS_PASSWORD" +else + DOCKER_RUN_ARGS="$DOCKER_RUN_ARGS $REDIS_IMAGE:$REDIS_VERSION" fi +# 🚀 Start Redis echo "Starting single-node Redis instance: $DOCKER_RUN_ARGS" docker run $DOCKER_RUN_ARGS From 6991b778775793e12300cc62164be57f1941d6fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20P=C3=B6hls?= Date: Wed, 12 Nov 2025 05:47:33 +0100 Subject: [PATCH 3/5] switch from docker:stable to docker:latest --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bad0db3..ef3f311 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker:stable +FROM docker:latest COPY start-redis.sh /start-redis.sh RUN chmod +x /start-redis.sh -ENTRYPOINT ["/start-redis.sh"] \ No newline at end of file +ENTRYPOINT ["/start-redis.sh"] From a52dd79434c527d6e12cd553e20d2c0963ca0c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20P=C3=B6hls?= Date: Wed, 12 Nov 2025 05:53:31 +0100 Subject: [PATCH 4/5] prepare changelog for 1.8.1 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6db0a6c..0b357db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [1.8.1](https://github.com/supercharge/redis-github-action/compare/v1.8.0...v1.8.1) - 2025-11-12 + +### Fixed +- change Docker tag from `docker:stable` to `docker:latest` + + ## [1.8.0](https://github.com/supercharge/redis-github-action/compare/v1.7.0...v1.8.0) - 2023-12-12 ### Added From bc274cb7238cd63a45029db04ee48c07a72609fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20P=C3=B6hls?= Date: Wed, 12 Nov 2025 05:54:02 +0100 Subject: [PATCH 5/5] prepare readme for 1.8.1 --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 44abd1c..5f7cd0f 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ jobs: node-version: ${{ matrix.node-version }} - name: Start Redis - uses: supercharge/redis-github-action@1.7.0 + uses: supercharge/redis-github-action@1.8.1 with: redis-version: ${{ matrix.redis-version }} @@ -85,7 +85,7 @@ jobs: steps: - name: Start Redis - uses: supercharge/redis-github-action@1.7.0 + uses: supercharge/redis-github-action@1.8.1 with: redis-image: redis/redis-stack-server redis-version: ${{ matrix.redis-version }} @@ -111,7 +111,7 @@ jobs: steps: - name: Start Redis - uses: supercharge/redis-github-action@1.7.0 + uses: supercharge/redis-github-action@1.8.1 with: redis-version: ${{ matrix.redis-version }} redis-port: 12345 @@ -137,7 +137,7 @@ jobs: steps: - name: Start Redis - uses: supercharge/redis-github-action@1.7.0 + uses: supercharge/redis-github-action@1.8.1 with: redis-version: ${{ matrix.redis-version }} redis-container-name: redis-auth-token-cache @@ -163,7 +163,7 @@ jobs: steps: - name: Start Redis - uses: supercharge/redis-github-action@1.7.0 + uses: supercharge/redis-github-action@1.8.1 with: redis-version: ${{ matrix.redis-version }} redis-remove-container: true # false by default @@ -189,7 +189,7 @@ jobs: steps: - name: Start Redis - uses: supercharge/redis-github-action@1.7.0 + uses: supercharge/redis-github-action@1.8.1 with: redis-version: ${{ matrix.redis-version }} redis-password: 'password'