|
1 | 1 | # Sync workflows |
2 | 2 |
|
3 | | -`sync-app.yaml` and `sync-all-apps.yaml` sync app configs to a Nuon API using a |
4 | | -per-environment [GitHub Environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment) |
| 3 | +`sync-all-apps.yaml` syncs app configs to a Nuon API using a per-environment |
| 4 | +[GitHub Environment](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment) |
5 | 5 | secret named `NUON_CONFIG`. |
6 | 6 |
|
7 | | -- `sync-app.yaml` runs on PRs (against the `stage` environment) and on pushes to |
8 | | - `main` (against the `prod` environment). |
9 | | -- `sync-all-apps.yaml` is dispatched manually (or on schedule) and lets you pick |
10 | | - the environment, ref, and an optional subset of apps. |
| 7 | +- `sync-all-apps.yaml` is dispatched manually and lets you pick the environment, |
| 8 | + ref, and an optional subset of apps. Syncing never happens automatically on |
| 9 | + PRs or pushes. |
11 | 10 |
|
12 | | -Each job selects a GitHub Environment and reads `secrets.NUON_CONFIG` from it, |
| 11 | +The job selects a GitHub Environment and reads `secrets.NUON_CONFIG` from it, |
13 | 12 | writing the value to `$HOME/.nuon` before running `nuon apps sync`. |
14 | 13 |
|
15 | 14 | ## Adding a new environment |
@@ -72,8 +71,7 @@ The `NUON_CONFIG` secret is the full `~/.nuon` YAML config, and its `api_token` |
72 | 71 | ``` |
73 | 72 |
|
74 | 73 | 6. To make it selectable in `sync-all-apps.yaml`, add the environment name to the |
75 | | - `environment` input `options` list. To use it automatically in `sync-app.yaml`, |
76 | | - update the `environment:` expression on the `sync` job. |
| 74 | + `environment` input `options` list. |
77 | 75 |
|
78 | 76 | Because the secret carries `api_url`, `org_id`, and the admin `api_token`, each |
79 | 77 | environment is fully scoped by its own `NUON_CONFIG` — no other workflow changes |
|
0 commit comments