Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#62: add option for specifying image #64

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Sam-Bate-ITV
Copy link

Relates to and solves issue #62

Adding a new optional field for mongodb-image which defaults to the original 'mongo'. This allows users to instead use an alternative image like 'public.ecr.aws/docker/library/mongo', avoiding the rate limits of Docker Hub.

Note that in this PR I also set the tests to use the image from Amazon's docker repo so that all the tests can run without hitting rate limit of Docker Hub meaning all the tests ran within a few minutes.

@Sam-Bate-ITV
Copy link
Author

@marcuspoehls please take a look at reviewing/merging this as I'm keen to pull images from ECR rather than Docker Hub

@marcuspoehls
Copy link
Member

@Sam-Bate-ITV Hey Sam, thank you for your ping 🙂 I’ll review until tomorrow night

start-mongodb.sh Outdated Show resolved Hide resolved
Copy link
Member

@marcuspoehls marcuspoehls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sam-Bate-ITV Thank you for the pull request. I’ve added minor comments. Please have a look and maybe you find time to adjust the code? I would appreciate your help. Let’s push this feature over the finish line 🙂

@@ -18,4 +18,5 @@ jobs:
- name: Start MongoDB Server
uses: ./
with:
mongodb-image: 'public.ecr.aws/docker/library/mongo'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to avoid adding the mongodb-image configuration to all GitHub Action workflows. It would be good if we add a new workflow file using the ECR registry.

@Sam-Bate-ITV Sam, can you please remove all the added mongodb-image configs from the existing workflow YAML files and add a workflow. The new workflow file should be a copy of the test-single-instance.yml that uses a custom image.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reverted this to use the default from docker hub. Of course this may impact the workflow from completing

README.md Outdated
@@ -60,6 +60,8 @@ jobs:
- name: Start MongoDB
uses: supercharge/[email protected]
with:
# Here we are using an image from Amazon's ECR rather than the default image from Docker Hub
mongodb-image: 'public.ecr.aws/docker/library/mongo'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the option to use a custom MongoDB docker image a new section in the README.md. Please create a section like here https://github.com/supercharge/redis-github-action/blob/main/README.md#using-a-custom-redis-image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants