gruntwork-io / terragrunt-action

A GitHub Action for installing and running Terragrunt
Apache License 2.0
99 stars 38 forks source link

Add support to use a custom registry #74

Open hpedrorodrigues opened 1 month ago

hpedrorodrigues commented 1 month ago

Hey 👋🏻

First of all, thanks for maintaining this action! 🚀

Describe the problem you are experiencing

Docker Hub started enforcing rate limits to Google IP addresses on July 15, 2024. So, anyone using this action along with self-hosted runners in Google Cloud may eventually hit the pull limit.

e.g.,

toomanyrequests: You have reached your pull rate limit.

Describe the solution you'd like

One of the options given by Google Cloud is to create a remote repository. However, to use this action along with a remote repository, we will need a way to provide a custom registry.

e.g., gruntwork/terragrunt -> <location>.pkg.dev/<project>/<repository>/gruntwork/terragrunt

Additional context


Not sure if I'm missing something here. So please let me know.

hpedrorodrigues commented 1 month ago

AFAIK, GitHub doesn't allow setting build args to docker container actions (e.g., https://github.com/actions/runner/discussions/2019). So, in the meantime, I decided to create this one (tf-check) since I only use this action to check file formats at the moment.

If you see another option besides publishing this image to another registry, I'm open to working on it.

Let me know your thoughts.

marcinkubica commented 1 week ago

@hpedrorodrigues or you could publish the image to ghcr.io and the problem is "solved". I'm doing it myself in a private repo. But it's so ugly to maintain.

Ideally Gruntwork would need to publish terragrunt image to ghcr.io which then is used in action to solve this issue.

Or publish this action as dockerfile and then we use it with

- name: Plan terragrunt
  uses: docker://ghcr.io/gruntwork-io/terragrunt-action:{version}

which by the way is much more effective than what happens now when action must be prebuilt before each workflow run