{"id":13493538,"url":"https://github.com/supercharge/redis-github-action","last_synced_at":"2025-04-04T10:05:21.151Z","repository":{"id":41205556,"uuid":"228611546","full_name":"supercharge/redis-github-action","owner":"supercharge","description":"Use Redis in GitHub Actions","archived":false,"fork":false,"pushed_at":"2023-12-12T03:59:53.000Z","size":71,"stargazers_count":103,"open_issues_count":1,"forks_count":29,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-30T04:49:13.432Z","etag":null,"topics":["github-actions","github-actions-docker","redis","supercharge"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supercharge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-17T12:26:52.000Z","updated_at":"2024-10-06T10:25:00.000Z","dependencies_parsed_at":"2023-12-12T04:40:51.197Z","dependency_job_id":null,"html_url":"https://github.com/supercharge/redis-github-action","commit_stats":{"total_commits":47,"total_committers":5,"mean_commits":9.4,"dds":0.1063829787234043,"last_synced_commit":"f63fe516254d0af5df91755a4488274c2e71e38c"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercharge%2Fredis-github-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercharge%2Fredis-github-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercharge%2Fredis-github-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supercharge%2Fredis-github-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supercharge","download_url":"https://codeload.github.com/supercharge/redis-github-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247151212,"owners_count":20892282,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","github-actions-docker","redis","supercharge"],"created_at":"2024-07-31T19:01:16.253Z","updated_at":"2025-04-04T10:05:21.129Z","avatar_url":"https://github.com/supercharge.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\r\n  \u003ca href=\"https://superchargejs.com\"\u003e\r\n    \u003cimg width=\"471\" style=\"max-width:100%;\" src=\"https://superchargejs.com/images/supercharge-text.svg\" /\u003e\r\n  \u003c/a\u003e\r\n  \u003cbr/\u003e\r\n  \u003cbr/\u003e\r\n  \u003cp\u003e\r\n    \u003ch3\u003eRedis in GitHub Actions\u003c/h3\u003e\r\n  \u003c/p\u003e\r\n  \u003cp\u003e\r\n    Start a Redis server in your GitHub Actions.\r\n  \u003c/p\u003e\r\n  \u003cbr/\u003e\r\n  \u003cp\u003e\r\n    \u003ca href=\"#usage\"\u003e\u003cstrong\u003eUsage\u003c/strong\u003e\u003c/a\u003e\r\n  \u003c/p\u003e\r\n  \u003cbr/\u003e\r\n  \u003cbr/\u003e\r\n  \u003cp\u003e\r\n    \u003cem\u003eFollow \u003ca href=\"http://twitter.com/marcuspoehls\"\u003e@marcuspoehls\u003c/a\u003e and \u003ca href=\"http://twitter.com/superchargejs\"\u003e@superchargejs\u003c/a\u003e for updates!\u003c/em\u003e\r\n  \u003c/p\u003e\r\n\u003c/div\u003e\r\n\r\n---\r\n\r\n\r\n## Introduction\r\nThis GitHub Action starts a Redis server on the default port `6379`.\r\n\r\nThis is useful when running tests against a Redis database.\r\n\r\n\r\n## Usage\r\nA code example says more than 1,000 words. Here’s an exemplary GitHub Action using a Redis server in versions 4 and 5 to test a Node.js app:\r\n\r\n```yaml\r\nname: Run tests\r\n\r\non: [push]\r\n\r\njobs:\r\n  build:\r\n    runs-on: ubuntu-latest\r\n    strategy:\r\n      matrix:\r\n        node-version: [18.x, 20.x]\r\n        redis-version: [6, 7]\r\n\r\n    steps:\r\n    - name: Git checkout\r\n      uses: actions/checkout@v3\r\n\r\n    - name: Use Node.js ${{ matrix.node-version }}\r\n      uses: actions/setup-node@v3\r\n      with:\r\n        node-version: ${{ matrix.node-version }}\r\n\r\n    - name: Start Redis\r\n      uses: supercharge/redis-github-action@1.7.0\r\n      with:\r\n        redis-version: ${{ matrix.redis-version }}\r\n\r\n    - run: npm install\r\n\r\n    - run: npm test\r\n      env:\r\n        CI: true\r\n```\r\n\r\n\r\n### Using a Custom Redis Image\r\nYou can utilize an alternative Redis image using the `redis-image` input:\r\n\r\n```yaml\r\nname: Run tests\r\n\r\non: [push]\r\n\r\njobs:\r\n  build:\r\n    runs-on: ubuntu-latest\r\n    strategy:\r\n      matrix:\r\n        redis-version: [6.2.4-v4, 6.2.6-v3]\r\n\r\n    steps:\r\n    - name: Start Redis\r\n      uses: supercharge/redis-github-action@1.7.0\r\n      with:\r\n        redis-image: redis/redis-stack-server\r\n        redis-version: ${{ matrix.redis-version }}\r\n\r\n    - name: …\r\n```\r\n\r\n\r\n### Using Redis on a Custom Port\r\nYou can start the Redis instance on a custom port using the `redis-port` input:\r\n\r\n```yaml\r\nname: Run tests\r\n\r\non: [push]\r\n\r\njobs:\r\n  build:\r\n    runs-on: ubuntu-latest\r\n    strategy:\r\n      matrix:\r\n        redis-version: [6, 7]\r\n\r\n    steps:\r\n    - name: Start Redis\r\n      uses: supercharge/redis-github-action@1.7.0\r\n      with:\r\n        redis-version: ${{ matrix.redis-version }}\r\n        redis-port: 12345\r\n\r\n    - name: …\r\n```\r\n\r\n\r\n### Using a Custom Container Name\r\nThis GitHub Action provides a Redis Docker container. The default container name is `redis`. It can be helpful to customize the container name. For example, when running multiple Redis instances in parallel. You can customize the container name using the `redis-container-name` input:\r\n\r\n```yaml\r\nname: Run tests\r\n\r\non: [push]\r\n\r\njobs:\r\n  build:\r\n    runs-on: ubuntu-latest\r\n    strategy:\r\n      matrix:\r\n        redis-version: [6, 7]\r\n\r\n    steps:\r\n    - name: Start Redis\r\n      uses: supercharge/redis-github-action@1.7.0\r\n      with:\r\n        redis-version: ${{ matrix.redis-version }}\r\n        redis-container-name: redis-auth-token-cache\r\n\r\n    - name: …\r\n```\r\n\r\n\r\n### Remove container when exit\r\nStarting 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:\r\n\r\n```yaml\r\nname: Run tests\r\n\r\non: [push]\r\n\r\njobs:\r\n  build:\r\n    runs-on: ubuntu-latest\r\n    strategy:\r\n      matrix:\r\n        redis-version: [6, 7]\r\n\r\n    steps:\r\n    - name: Start Redis\r\n      uses: supercharge/redis-github-action@1.7.0\r\n      with:\r\n        redis-version: ${{ matrix.redis-version }}\r\n        redis-remove-container: true # false by default\r\n\r\n    - name: …\r\n```\r\n\r\n\r\n### Using Authentication\r\nStarting in v1.7.0, You can start the Redis with Authentication using the `redis-password` input:\r\n\r\n```yaml\r\nname: Run tests\r\n\r\non: [push]\r\n\r\njobs:\r\n  build:\r\n    runs-on: ubuntu-latest\r\n    strategy:\r\n      matrix:\r\n        redis-version: [6, 7]\r\n\r\n    steps:\r\n    - name: Start Redis\r\n      uses: supercharge/redis-github-action@1.7.0\r\n      with:\r\n        redis-version: ${{ matrix.redis-version }}\r\n        redis-password: 'password'\r\n\r\n    - name: …\r\n```\r\n\r\n\r\n## License\r\nMIT © [Supercharge](https://superchargejs.com)\r\n\r\n---\r\n\r\n\u003e [superchargejs.com](https://superchargejs.com) \u0026nbsp;\u0026middot;\u0026nbsp;\r\n\u003e GitHub [@supercharge](https://github.com/supercharge) \u0026nbsp;\u0026middot;\u0026nbsp;\r\n\u003e Twitter [@superchargejs](https://twitter.com/superchargejs)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercharge%2Fredis-github-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupercharge%2Fredis-github-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupercharge%2Fredis-github-action/lists"}