Skip to content

Commit 5002ae5

Browse files
authored
docs on pinning CLI version (#202)
1 parent 675c304 commit 5002ae5

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ See the [action.yml](https://github.com/devcontainers/action/blob/main/action.ym
2323

2424
To best get started, create your own repo from the [`devcontainers/feature-starter`](https://github.com/devcontainers/feature-starter) or [`devcontainers/template-starter`](https://github.com/devcontainers/template-starter) repos, customize the provided examples, and trigger the `release.yaml` workflow.
2525

26+
### Pinning `devcontainer` CLI version
27+
28+
This action heavily relies on the [devcontainers/cli](https://github.com/devcontainers/cli) for various operations. By default, this action will fetch the latest version published to [npm](https://www.npmjs.com/package/@devcontainers/cli). The `devcontainer-cli-version` property can be used to pin to a specific CLI release. Eg:
29+
30+
```yaml
31+
- name: "Publish Features"
32+
uses: devcontainers/action@v1
33+
with:
34+
publish-features: "true"
35+
base-path-to-features: "./src"
36+
devcontainer-cli-version: "0.53.0"
37+
```
38+
39+
The changelog for the CLI can always be found here: https://github.com/devcontainers/cli/blob/main/CHANGELOG.md
40+
2641
## Design
2742
2843
Internally, this GitHub Action will fetch the latest published version of the [Dev Container CLI](https://github.com/devcontainers/cli) and execute the appropriate CLI commands - namely `devcontainer features publish` and `devcontainer templates publish`.

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ inputs:
2727
default: 'false'
2828
description: >-
2929
Disables adding a git repo tag for each Feature or Template release.
30+
devcontainer-cli-version:
31+
required: false
32+
default: ''
33+
description: >-
34+
Override the version of the devcontainer CLI to use. Defaults to the latest published version.
3035
# Feature specific inputs
3136
publish-features:
3237
required: false

0 commit comments

Comments
 (0)