supercharge / mongodb-github-action

Use MongoDB in GitHub Actions
MIT License
215 stars 46 forks source link

Action fails due to docker: toomanyrequests #62

Open emarchak opened 2 weeks ago

emarchak commented 2 weeks ago

We're using this step in our gh actions and it failed due to the following error.

It looks like we're unauthenticated with docker when pulling the mongodb lib, and I can't see anything in this actions code/readme authenticating against docker. Plus we're only running a few actions a day (small company), so my assumption is that we hit a rate limit with a few other anonymous users.

Any thoughts on how to correct this?

Selecting correct MongoDB client
    - Using MongoDB client: [mongosh --quiet]

Starting MongoDB as single-node replica set
    - port [42069]
    - version [5.0]
    - replica set [rs0]

  Unable to find image 'mongo:5.0' locally
  5.0: Pulling from library/mongo
  docker: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit.
  See 'docker run --help'.
  Error starting MongoDB Docker container

Our config is the following:

        # Step: Start MongoDB
      - name: Start MongoDB
        uses: supercharge/mongodb-github-action@1.10.0
        with:
          mongodb-version: "5.0"
          mongodb-port: 42069
          mongodb-replica-set: rs0
marcuspoehls commented 1 week ago

I remember that Docker allows you to increase your rate limit when using authenticated requests. You may need to log in to Docker from your GitHub Actions. I don’t know how to do that in GitHub Actions, though 😬 please search for details on that topic yourself. Hope you find something related to Docker rate limiting when using GitHub Actions

BioCarmen commented 2 days ago

Hello. Seems like Login into Docker from github actions won't help in this case becasue Container pull happens at the first step of the build before docker login. https://docs.docker.com/docker-hub/download-rate-limit/#github-actions Can we allow username and password for docker in this actions?