Skip to content

Commit

Permalink
docs: added automation step
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon committed Jul 11, 2023
1 parent 36a1c5c commit 90b32b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ The [iojs.org](./iojs.org) directory contains the [aliases.json](./iojs.org/alia

Since access to the Mailgun API key is required, only members of the @nodejs/build-infra team have the permission to push code to the `main` branch. That was done in order to minimize the possibility of mismatches between the information in this repo, and the actual email routes that are set up.

### Procedure
### Automatic Procedure

There are two GitHub Actions workflows that run automatically when targeting changes to the `main` branch:
- `ci.yml` this workflow runs the update in `dry-run` mode and reports the changes that would be made. It is triggered by any PR against the `main` branch.
- `cd.yml` this workflow runs the update and actually applies the changes. It is triggered by any push to the `main` branch.
### Manual Procedure

The [update](./update) directory contains a node program which will read the aliases mapping file, fetch the list of mail routes from Mailgun and update the routes to make sure they match the required state. The program is run by passing it a domain name as an argument (`update/update.js iojs.org`).

The Mailgun API key for the given domain is required. It can be found in the `admin_logins.md` file in the secrets repo (build/infra/), or directly via the Rackspace API. The key should be stored as a file named `iojs.org/credentials.json` in the form: `{ "api-key": "key-abc..." }` within a code tree.
The Mailgun API key for the given domain is required. It can be found in the `admin_logins.md` file in the secrets repo (build/infra/), or directly via the Rackspace API. The key should be used as environment variable `MAILGUN_API_KEY` when running the program.

The programs can be used with `--dry-run` to verify the current status and what will be changed by an update.

Expand Down

0 comments on commit 90b32b6

Please sign in to comment.