GithubHelp home page GithubHelp logo

Comments (9)

marcuspoehls avatar marcuspoehls commented on August 29, 2024

@qiulang this GitHub Action adds a docker container running Redis. The Redis CLI is probably available inside of the container.

from redis-github-action.

qiulang avatar qiulang commented on August 29, 2024

Yes I noticed your action using docker container. But I am sure the github action can not access it because without installing redis-cli myself, my action failed with the exact the error message redis-cli not found.

The problem with installing it myself if that it seems to take a long time for installation to complete (around 20 seconds). If adding that to your action it will take around 30 seconds (on average), while if I just https://github.com/marketplace/actions/actions-setup-redis it takes around 10 seconds.

from redis-github-action.

marcuspoehls avatar marcuspoehls commented on August 29, 2024

Ok, looks like your GitHub action needs the Redis CLI. You’re probably using something like this, are you?

...
- name: Start Redis
  uses: supercharge/[email protected]
  with:
    redis-version: ${{ matrix.redis-version }}

- name: Install redis cli
  run: sudo apt-get install -y redis-tools

- name: Run Redis CLI command
  run: redis-cli ping

You need to run some Redis setup from the action’s host machine?

I’m curious: what’s missing in actions-setup-redis that you’re not using it?

from redis-github-action.

qiulang avatar qiulang commented on August 29, 2024

Yes I use redis-cli ping to make sure redis-server is up because my app needs redis and it happened in my host environment it fails to start redis-server.

I don't get you words "what’s missing in actions-setup-redis that you’re not using it?" I just change the 2 steps I listed into the following step.

    - name: Start Redis using actions-setup-redis@v1
      uses: shogo82148/actions-setup-redis@v1
      with:
        redis-version: ${{ matrix.redis-version }}

from redis-github-action.

marcuspoehls avatar marcuspoehls commented on August 29, 2024

Ok, so you want to make sure Redis is up and running before moving on. We can add that to this action. In case Redis doesn't start up properly, we can stop the pipeline.

I’m hesitant to install the Redis CLI on the host machine from this action. I would like to keep it reduced to the docker container.

from redis-github-action.

qiulang avatar qiulang commented on August 29, 2024

I understand. So at first I just added it myself (without opening this issue) But after I saw actions-setup-redis uses much less time I was wondering how do they do that ?

from redis-github-action.

marcuspoehls avatar marcuspoehls commented on August 29, 2024

They download the Redis source code, compile it, cache it and then start Redis. The caching is probably bringing the speed improvements

from redis-github-action.

qiulang avatar qiulang commented on August 29, 2024

@marcuspoehls I know this issue has been updated for a while but recently I built a docker image with redis server running inside, somewhat like what you did here and found something strange:

Although my code (running by github action) can access the redis server running inside my docker container, the redis-cli I installed in github action can't access it. When run redis-cli ping, I got the error Error: Connection reset by peer. I didn't figure out why.

Not sure if you met this error before but this may make my issue a bit harder.

from redis-github-action.

marcuspoehls avatar marcuspoehls commented on August 29, 2024

Closing this issue because it got old :)

from redis-github-action.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.