Skip to content
Projects

shogo82148/actions-setup-redis

View on GitHub

shogo82148/actions-setup-redis has 47 GitHub stars and 3 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 09:10 UTC. Last push 2026-11-13.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Setup Redis database Action

Data

README.md

Original

actions-setup-redis

GitHub Actions status

This action sets by redis/valkey database for use in actions by:

  • optionally downloading and caching a version of redis
  • start redis-server

Motivation

  • GitHub Actions supports Docker services, and there is the official redis image. but it works on only Linux.
  • Some test utils for redis (such as Test::RedisServer) requires redis-server installed on the local host.

Usage

See action.yml

Basic:

steps:
  - uses: actions/checkout@v4
  - uses: shogo82148/actions-setup-redis@v1
    with:
      redis-version: "7.x"
  - run: redis-cli ping

Matrix Testing:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - "ubuntu-latest"
          - "macOS-latest"
        # - 'windows-latest' # windows is currently not supported.
        redis:
          - "7.2"
          - "7.0"
          - "6.2"
          - "6.0"
          - "5.0"
          - "4.0"
    name: Redis ${{ matrix.redis }} on ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - name: Setup redis
        uses: shogo82148/actions-setup-redis@v1
        with:
          redis-version: ${{ matrix.redis }}
          auto-start: "false"

      - name: tests with Test::RedisServer
        run: |
          cpanm Test::RedisServer
          prove -lv t

Configuration

distribution

The distribution. The valid values are redis or valkey. The default value is redis. You can use redis- and valkey- prefixes in redis-version instead of the distribution input. For example, the following two workflows install Valkey 7.2.

- uses: shogo82148/actions-setup-redis@v1
  with:
    distribution: "valkey"
    redis-version: "7.2"
- uses: shogo82148/actions-setup-redis@v1
  with:
    redis-version: "valkey-7.2"

redis-version

The version of Redis. The redis-version input supports the following syntax:

  • latest: the latest version of stable Redis
  • 7, 6, 5, 4: major versions
  • 7.2, 7.0: minor versions
  • 7.2.0, 7.2.1: patch versions

The default value is latest. The actions supports only stable versions.

redis-port

The port number that redis-server listens. The default value is 6379.

redis-tls-port

The port number that redis-server listens TLS connections. The default value is 0 and TLS is disabled.

auto-start

If the auto-start is true, the action starts redis-server as a daemon. If it is false, the action just install Redis commands, doesn't start redis-server. It is a boolean value, valid values are true or false. The default value is true.

redis-conf

Extra configurations for redis.conf. See Redis configuration.

Outputs

redis-port

The port number that redis-server listens.

jobs:
  build:
    runs-on: "ubuntu-latest"
    steps:
      - uses: actions/checkout@v4
      - id: setup
        uses: shogo82148/actions-setup-redis@v1

      # connect to the redis-server via TCP
      - run: |
          redis-cli -h 127.0.0.1 -p ${{ steps.setup.outputs.redis-port }} ping

redis-unix-socket

The unix domain socket path that redis-server listens.

jobs:
  build:
    runs-on: "ubuntu-latest"
    steps:
      - uses: actions/checkout@v4
      - id: setup
        uses: shogo82148/actions-setup-redis@v1

      # connect to the redis-server via unix domain socket
      - run: |
          redis-cli -s ${{ steps.setup.outputs.redis-unix-socket }} ping

redis-tls-port

The port number that redis-server listens TLS connections.

redis-tls-dir

The directory path for TLS sample certificates/keys.

jobs:
  build:
    runs-on: "ubuntu-latest"
    steps:
      - uses: actions/checkout@v4
      - id: setup
        uses: shogo82148/actions-setup-redis@v1
        with:
          # TLS Support starts from v6.0.
          redis-version: "6.0"

          # TLS is disabled by default. You need extra configurations.
          redis-port: "0"
          redis-tls-port: "6379"

      # connect to the redis-server via TLS
      - run: |
          redis-cli -h 127.0.0.1 -p "${{ steps.setup.outputs.redis-tls-port }}" \
            --tls \
            --cert "${{ steps.setup.outputs.redis-tls-dir }}/redis.crt" \
            --key "${{ steps.setup.outputs.redis-tls-dir }}/redis.key" \
            --cacert "${{ steps.setup.outputs.redis-tls-dir }}/ca.crt" \
            ping

See TLS Support for more details.

redis-path

The absolute path to the redis-server, redis-cli, etc.

License

The scripts and documentation in this project are released under the MIT License