mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/11874 Use `--token-url` instead of `--token` in the runner setup instructions. `--token-url` is more secure. It was also decided [not to implement `--token`](https://code.forgejo.org/forgejo/runner/pulls/1457). The new instructions look as follows: ``` $ echo -n "a3bac733-079f-4917-ae9f-4acb99f1827b" > /path/to/runner-token $ forgejo-runner daemon \ --url http://192.168.178.62:3000/ \ --uuid 5982831f-8ee7-42c7-abcc-49c7d6dba586 \ --token-url file:///path/to/runner-token \ --label docker:docker://node:lts ``` `--label` is also new because Forgejo Runner is inoperable when neither a runner configuration nor `--label` are present. ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. All work and communication must conform to Forgejo's [AI Agreement](https://codeberg.org/forgejo/governance/src/branch/main/AIAgreement.md). There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests for Go changes (can be removed for JavaScript changes) - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [ ] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I ran... - [x] `make pr-go` before pushing ### Tests for JavaScript changes (can be removed for Go changes) - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [x] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change. - [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change. *The decision if the pull request will be shown in the release notes is up to the mergers / release team.* The content of the `release-notes/<pull request number>.md` file will serve as the basis for the release notes. If the file does not exist, the title of the pull request will be used instead. Co-authored-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11877 Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.codeberg.org> Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
55 lines
2.2 KiB
Go HTML Template
55 lines
2.2 KiB
Go HTML Template
<div class="runner-container">
|
|
<h4 class="ui top attached header">
|
|
{{ctx.Locale.Tr "actions.runners.runner_setup.title" .Runner.Name}}
|
|
<div class="ui right">
|
|
<a class="ui secondary tiny button" href="{{.RunnersListLink}}" tabindex="0">
|
|
{{ctx.Locale.Tr "actions.runners.runner_setup.list_of_runners_link"}}
|
|
</a>
|
|
</div>
|
|
</h4>
|
|
<div class="ui attached segment">
|
|
<p>{{ctx.Locale.Tr "actions.runners.runner_setup.last_chance_copying_token"}}</p>
|
|
<dl>
|
|
<div class="item">
|
|
<dt>{{ctx.Locale.Tr "actions.runners.uuid"}}</dt>
|
|
<dd>
|
|
{{.Runner.UUID}}
|
|
<button class="ui basic label button"
|
|
aria-label="{{ctx.Locale.Tr "actions.runners.runner_setup.button_copy_uuid_aria"}}"
|
|
data-clipboard-text="{{.Runner.UUID}}">
|
|
{{svg "octicon-copy" 14}}
|
|
</button>
|
|
</dd>
|
|
</div>
|
|
<div class="item">
|
|
<dt>{{ctx.Locale.Tr "actions.runners.token"}}</dt>
|
|
<dd>
|
|
{{.Runner.Token}}
|
|
<button class="ui basic label button"
|
|
aria-label="{{ctx.Locale.Tr "actions.runners.runner_setup.button_copy_token_aria"}}"
|
|
data-clipboard-text="{{.Runner.Token}}">
|
|
{{svg "octicon-copy" 14}}
|
|
</button>
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
<h5>{{ctx.Locale.Tr "actions.runners.runner_setup.heading_using_configuration"}}</h5>
|
|
<pre><code aria-label="{{ctx.Locale.Tr "actions.runners.runner_setup.configuration_snippet_aria"}}">server:
|
|
connections:
|
|
forgejo:
|
|
url: {{.AppURL}}
|
|
uuid: {{.Runner.UUID}}
|
|
token: {{.Runner.Token}}
|
|
</code></pre>
|
|
<p>{{ctx.Locale.Tr "actions.runners.runner_setup.instruction_replace_connection_name"}}</p>
|
|
<h5>{{ctx.Locale.Tr "actions.runners.runner_setup.heading_using_options"}}</h5>
|
|
<pre><code aria-label="{{ctx.Locale.Tr "actions.runners.runner_setup.program_options_snippet_aria"}}">$ echo -n "{{.Runner.Token}}" > /path/to/runner-token
|
|
$ forgejo-runner daemon \
|
|
--url {{.AppURL}} \
|
|
--uuid {{.Runner.UUID}} \
|
|
--token-url file:///path/to/runner-token \
|
|
--label docker:docker://node:lts
|
|
</code></pre>
|
|
<p>{{ctx.Locale.Tr "actions.runners.runner_setup.instruction_advanced_configurations"}}</p>
|
|
</div>
|
|
</div>
|