You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9a23fa6
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/conventions/secrets.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
|`PROJECT_TOKEN` → `project_token`| organization (all repositories) |`add-to-project.yml`| Write to the organization's project board |
13
13
|`CT_PRUNE_COMPAT_CLIENT_ID`, `CT_PRUNE_COMPAT_PRIVATE_KEY`| organization, **CTActions only**|`compat-prune-monthly.yml` (`publish` job) | Token of the organization's [GitHub App](github-app.md)|
14
14
|`CT_RELEASE_CLIENT_ID`, `CT_RELEASE_PRIVATE_KEY`|**the environments `release` and `release-autonomous` of each package**, not the repository nor the organization |`release.yml` (jobs `start`, `merge`, `register`) | Token of the App [`ct-release`](github-app.md#ct-release-the-app-of-the-releases): only the jobs of the environment, after its approval, can mint it |
15
-
|`CT_RELEASE_REGISTRATION_TOKEN` (recommended) | the same environments |`release.yml` (job `register`) | The token of a release manager who is a **public** member of the organization, for the registration comment of a stable: the registration bot takes no comment of an App. Without it, the comment is handed to a person ([details](../workflows/release.md#the-registration-comment)) |
15
+
|`CT_RELEASE_REGISTRATION_TOKEN` (recommended) | the same environments, set by [`setup.sh`](../workflows/release.md#setting-it-up)|`release.yml` (job `register`) | The token of a release manager who is a **public** member of the organization, for the registration comment of a stable: the registration bot takes no comment of an App. Without it, the comment is handed to a person ([details](../workflows/release.md#the-registration-comment)) |
16
16
|`CT_RUNNERS_CLIENT_ID`, `CT_RUNNERS_PRIVATE_KEY`| organization (all repositories) |`select-gpu-runner.yml`| Token of the read-only App `ct-runners` ([details](../workflows/select-gpu-runner.md#the-github-app-ct-runners)) |
17
17
|`OCCIDATA_SSH_KEY`, `OCCIDATA_KNOWN_HOSTS`| CTActions |`occidata-runner-watchdog.yml`| SSH to `occidata-cluster.irit.fr`|
18
18
|`GITHUB_TOKEN`| built in | most workflows | Token of the repository the workflow runs in |
- the environment `release`, with `ocots` as required reviewer (`CT_RELEASE_REVIEWER` to change it);
234
+
- the App's secrets `CT_RELEASE_CLIENT_ID` and `CT_RELEASE_PRIVATE_KEY`, and the token below, in the **environment**, not in the repository: only the jobs of the environment, after its approval, see them;
235
+
- the label `release: supervised`.
248
236
249
-
## The registration comment
237
+
`--autonomous` also creates `release-autonomous` (no reviewer, same secrets) and the label `release: autonomous`. Without it, GitHub creates `release-autonomous` empty when a job names it, without the App's secrets, and a run in autonomous mode fails at the token, before anything is done.
250
238
251
-
The registration bot takes a comment only from a **public member** of the organization: an
252
-
App never is one, so it refuses the App's comment ("not a publicly listed member", seen on
253
-
CTParser 0.9.6). The comment is therefore a person's:
239
+
By hand, once per package: the App `ct-release` must be **installed** on it (organization settings, *Installed GitHub Apps*, *Selected repositories*). Then add the caller above.
254
240
255
-
| `CT_RELEASE_REGISTRATION_TOKEN` | What the job `register` does | Then |
256
-
| --- | --- | --- |
257
-
| set (the default to aim at) | posts the comment as that person, once, after the approval in supervised mode | the bot opens General's PR; the workflow follows it |
258
-
| not set | posts, as the App, the comment for a person to post: in a code block, its mention broken by an apostrophe (`@'JuliaRegistrator`), with the instruction to remove it | the workflow waits, without asking for an approval again; a person posts it once, and the workflow follows General's PR |
259
-
260
-
Both modes use the token: in supervised mode the approval of the job is the person's
261
-
control, and a copy to paste on top of it would check nothing more. Without the token, both
262
-
modes wait for the person.
263
-
264
-
The mention is broken because the bot reacts to it wherever it is written, even in a code
265
-
block or a quote. If the bot refuses a comment anyway (the token's person is not a public
266
-
member, for instance), the workflow never posts again: it stops, and its stop shows the
267
-
same comment for a person to post. A comment the bot refused registered nothing, so `REL6`
268
-
(one registration mention) does not count it: `status`and `release.jl audit` count only
269
-
the mentions the bot did not refuse.
241
+
### The registration token
242
+
243
+
`CT_RELEASE_REGISTRATION_TOKEN`is what the registration comment of a stable is posted with ([why](#the-registration-comment)). It is the token of a release manager who is a **public** member of the organization: the registration bot takes no comment of an App.
244
+
245
+
1. As that person: *Settings, Developer settings, Personal access tokens, Fine-grained tokens, Generate new token*.
246
+
2. *Resource owner*: `control-toolbox`(an owner approves the token under the organization's *Personal access tokens, Pending requests* if the organization requires it). *Repository access*: *Only select repositories*, the packages released with `release.yml`. An expiration date: at most a year.
247
+
3. *Repository permissions*: **Issues: read and write**, and **Contents: read and write** to cover the registration comment on a commit (when the release PR's merge commit moved); *Metadata: read* comes with them. Nothing else.
248
+
4. Copy the value (shown once) and give it to `setup.sh`. One token serves all the packages; add each new package to its repositories.
249
+
250
+
An environment secret is read after the approval of the environment, which is why it is set per package and not once for the organization (an organization secret would be readable by any workflow of the repositories it is shared with). When the token expires, generate it again and run `setup.sh` again.
251
+
252
+
Without the token, the workflow hands the comment to a person ([details](#the-registration-comment)).
check "the token is a secret of the environment""secret set CT_RELEASE_REGISTRATION_TOKEN -R control-toolbox/Admin --env release <<< github_pat_x""$log"
45
+
check "the autonomous environment""environments/release-autonomous""$log"
46
+
check "the autonomous label""label create release: autonomous""$log"
47
+
48
+
:>"$log"
49
+
bash "$setup" Reader >"$tmp/out"2>&1
50
+
check "a repository without admin rights is skipped""skipped""$tmp/out"
0 commit comments