|
3 | 3 | This guide provides getting started instructions for the official [Atlas CLI](https://github.com/mongodb/mongodb-atlas-cli) GitHub Action. |
4 | 4 |
|
5 | 5 | This Action allows you to run any Atlas CLI command in your own GitHub workflows. |
6 | | -By default, the latest Atlas CLI version is used. The version can be configured with the 'version' input parameter. |
| 6 | +By default, this Action uses the latest version of the Atlas CLI. The version can be configured with the 'version' input parameter, but only the |
| 7 | +latest version is officially supported. |
7 | 8 |
|
8 | 9 | ## Complete the prerequisites |
9 | 10 |
|
10 | 11 | Before you begin, complete the following prerequisites: |
11 | | -1. Configure Atlas CLI API Keys for the organisation or project that will be used in the Action. |
| 12 | + |
| 13 | +1. [Configure Atlas CLI API Keys](https://www.mongodb.com/docs/atlas/configure-api-access/) for your organization or project. |
12 | 14 | 2. Add the API Keys to the [repository secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets). |
13 | | -3. For authentication the environment variables MONGODB_ATLAS_PUBLIC_API_KEY and MONGODB_ATLAS_PRIVATE_API_KEY need to be set to the configured API keys in the workflow. |
| 15 | +3. Set the environment variables `MONGODB_ATLAS_PUBLIC_API_KEY` and `MONGODB_ATLAS_PRIVATE_API_KEY` to the Atlas CLI API Keys you configured. |
14 | 16 | See [Atlas CLI Environment Variables](https://www.mongodb.com/docs/atlas/cli/stable/atlas-cli-env-variables/) for all supported environment variables. |
15 | 17 |
|
16 | 18 | ## Configuration |
17 | 19 |
|
18 | 20 | To run CLI commands with this Action you can either use custom commands (see Basic workflow below) or use the configuration parameters |
19 | | -to run predefined workflows. Check out the [action.yml](action.yml) to find out which inputs/outputs are available. |
| 21 | +to run predefined workflows. See [action.yml](action.yml) for available inputs/outputs. |
20 | 22 |
|
21 | 23 | ## Example workflows |
22 | 24 |
|
23 | | -See [here](https://github.com/mongodb/atlas-github-action/blob/main/.github/workflows/test.yml) for more examples. |
| 25 | +See [test.yml](https://github.com/mongodb/atlas-github-action/blob/main/.github/workflows/test.yml) for more examples. |
24 | 26 |
|
25 | 27 | ### Basic |
26 | 28 | This workflow installs the CLI and prints the CLI version. |
|
42 | 44 | ``` |
43 | 45 |
|
44 | 46 | ### Setup and Teardown |
45 | | -This workflow sets up a project and a free cluster. It retrieves the connection string which can be used to connect to the created cluster. |
46 | | -Afterwards it deletes the project and cluster that was set up. |
| 47 | +This workflow sets up a project and creates a free cluster. It retrieves the connection string which can be used to connect to the new cluster. |
| 48 | +Afterwards, it deletes the project and cluster. |
47 | 49 | ```yaml |
48 | 50 | on: [push] |
49 | 51 |
|
|
83 | 85 | with: |
84 | 86 | delete-project-id: ${{ steps.create-project.outputs.create-project-id }} |
85 | 87 | delete-cluster-name: test-cluster |
86 | | -``` |
| 88 | +``` |
0 commit comments