Question

Error when trying to use github actions to push container image

Hi,

I am trying to use github actions to build and push to my container registry. The final step of my yml file is failing with this error:

denied: registry contains 1 repositories, limit is 1 Error: Process completed with exit code 1.

This is what the steps in the yml file look like:

steps:

      - name: Update Docker settings
        run: |
          sudo sed -i 's/ }/, \"max-concurrent-uploads\": 2 }/' /etc/docker/daemon.json
          sudo systemctl restart docker

      - name: Checkout the repo
        uses: actions/checkout@v3

      - name: Build container image
        run: docker build -t imagename .

      - name: Install doctl
        uses: digitalocean/action-doctl@v2
        with:
          token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

      - name: Log in to DigitalOcean Container Registry with short-lived credentials
        run: doctl registry login --expiry-seconds 600

      - name: Tag container image
        run: docker tag imagename registry.digitalocean.com/reponame/imagename

      - name: Push image to DigitalOcean Container Registry
        run: docker push registry.digitalocean.com/reponame/imagename

Anyone have any ideas?

Thanks,

Jason


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
September 1, 2023

Hi Jason,

The error message you’re receiving, denied: registry contains 1 repositories, limit is 1, suggests that you’ve hit the limit on the number of repositories that you’re allowed on your DigitalOcean Container Registry tier.

It seems like you are using the free tier which allows 1 repository. What you could do is either upgrade your container registry to the next tier or deleted your existing tier if you are not using it.

For more information, you can take a look at the pricing here:

https://www.digitalocean.com/pricing/container-registry

Besides that, your GitHub action looks good!

Hope that this helps!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel