|
35 | 35 | - name: Start MongoDB |
36 | 36 | uses: step-security/mongodb-github-action@1.12.0 |
37 | 37 | with: |
38 | | - # Here we are using an image from Amazon's ECR rather than the default image from Docker Hub |
39 | | - mongodb-image: 'public.ecr.aws/docker/library/mongo' |
40 | 38 | mongodb-version: ${{ matrix.mongodb-version }} |
41 | 39 |
|
42 | 40 | - run: npm install |
@@ -134,18 +132,6 @@ jobs: |
134 | 132 | CI: true |
135 | 133 | ``` |
136 | 134 |
|
137 | | -### Using a Custom Mongo Image |
138 | | -You can utilize an alternative MongoDB docker image using the `mongodb-image` input: |
139 | | - |
140 | | - |
141 | | -```yaml |
142 | | - - name: Start MongoDB |
143 | | - uses: step-security/mongodb-github-action@1.11.0 |
144 | | - with: |
145 | | - # Here we are using an image from Amazon's ECR rather than the default image from Docker Hub |
146 | | - mongodb-image: 'public.ecr.aws/docker/library/mongo' |
147 | | - mongodb-version: ${{ matrix.mongodb-version }} |
148 | | -``` |
149 | 135 |
|
150 | 136 | ### With Authentication (MongoDB `--auth` Flag) |
151 | 137 | 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. |
@@ -234,3 +220,17 @@ jobs: |
234 | 220 | ``` |
235 | 221 |
|
236 | 222 | **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. |
| 223 | + |
| 224 | +### Using a Custom Mongo Image |
| 225 | +You can utilize an alternative MongoDB docker image using the `mongodb-image` input: |
| 226 | + |
| 227 | + |
| 228 | +```yaml |
| 229 | + - name: Start MongoDB |
| 230 | + uses: step-security/mongodb-github-action@1.12.0 |
| 231 | + with: |
| 232 | + # Here we are using an image from Amazon's ECR rather than the default image from Docker Hub |
| 233 | + mongodb-image: 'public.ecr.aws/docker/library/mongo' |
| 234 | + mongodb-version: ${{ matrix.mongodb-version }} |
| 235 | +``` |
| 236 | + |
0 commit comments