Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
- name: Start MongoDB
uses: step-security/mongodb-github-action@1.12.0
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'
mongodb-version: ${{ matrix.mongodb-version }}

- run: npm install
Expand Down Expand Up @@ -134,18 +132,6 @@ jobs:
CI: true
```

### Using a Custom Mongo Image
You can utilize an alternative MongoDB docker image using the `mongodb-image` input:


```yaml
- name: Start MongoDB
uses: step-security/mongodb-github-action@1.11.0
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'
mongodb-version: ${{ matrix.mongodb-version }}
```

### With Authentication (MongoDB `--auth` Flag)
Setting the `mongodb-username` and `mongodb-password` inputs. As per the [Dockerhub documentation](https://hub.docker.com/_/mongo), this automatically creates an admin user and enables `--auth` mode.
Expand Down Expand Up @@ -234,3 +220,17 @@ jobs:
```

**Caveat:** due to [this issue](https://github.com/docker-library/mongo/issues/211), you **cannot enable user creation AND replica sets** initially. Therefore, if you use this action to setup a replica set, please create your users through a separate script.

### Using a Custom Mongo Image
You can utilize an alternative MongoDB docker image using the `mongodb-image` input:


```yaml
- name: Start MongoDB
uses: step-security/mongodb-github-action@1.12.0
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'
mongodb-version: ${{ matrix.mongodb-version }}
```