Skip to content

Commit fa904b2

Browse files
committed
docs: update CLI instructions and link setup-coder
Clarified CLI installation instructions for pushing template versions and linked to the GitHub Actions setup-coder for automation. Removed redundant setup-action note and added details on creating a headless user for CI workflows.
1 parent b3ec9aa commit fa904b2

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

docs/admin/templates/managing-templates/change-management.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ For an example, see how we push our development image and template
6262

6363
## Coder CLI
6464

65-
You can also [install Coder](../../../install/cli.md) to automate pushing new
66-
template versions in CI/CD pipelines.
65+
You can [install Coder](../../../install/cli.md) CLI to automate pushing new
66+
template versions in CI/CD pipelines. For GitHub Actions, see our
67+
[setup-coder](https://github.com/coder/setup-coder) action.
6768

6869
```console
6970
# Install the Coder CLI
@@ -88,9 +89,6 @@ coder templates push --yes $CODER_TEMPLATE_NAME \
8889
--name=$CODER_TEMPLATE_VERSION # Version name is optional
8990
```
9091

91-
You can also use the [coder/setup-action](https://github.com/coder/setup-coder)
92-
GitHub Action to install the Coder CLI and push new template versions.
93-
9492
## Testing and Publishing Coder Templates in CI/CD
9593

9694
See our [testing templates](../../../tutorials/testing-templates.md) tutorial

docs/tutorials/testing-templates.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,21 @@ ensures your templates are validated, tested, and promoted seamlessly.
2121

2222
- Install and configure Coder CLI in your environment.
2323
- Install Terraform CLI in your CI environment.
24-
- Configure [user roles and permissions](../admin/users/groups-roles.md#roles)
25-
for your Coder instance.
24+
- Create a [headless user](../admin/users/headless-auth.md) with the
25+
[user roles and permissions](../admin/users/groups-roles.md#roles) to manage
26+
templates and run workspaces.
27+
28+
## Creating the headless user
29+
30+
```shell
31+
coder users create \
32+
--username machine-user \
33+
--email machine-user@example.com \
34+
--login-type none
35+
36+
coder tokens create --user machine-user --lifetime 8760h
37+
# Copy the token and store it in a secret in your CI environment with the name `CODER_SESSION_TOKEN`
38+
```
2639

2740
## Example GitHub Action Workflow
2841

0 commit comments

Comments
 (0)