Skip to content

Commit

Permalink
docs on pinning CLI version
Browse files Browse the repository at this point in the history
  • Loading branch information
joshspicer committed Nov 21, 2023
1 parent 675c304 commit 2b5c0e2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ See the [action.yml](https://github.com/devcontainers/action/blob/main/action.ym

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.

### Pinning `devcontainer` CLI version

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:

```yaml
- name: "Publish Features"
uses: devcontainers/action@v1
with:
publish-features: "true"
base-path-to-features: "./src"
devcontainer-cli-version: "0.53.0"
```
The changelog for the CLI can always be found here: https://github.com/devcontainers/cli/blob/main/CHANGELOG.md
## Design
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`.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ inputs:
default: 'false'
description: >-
Disables adding a git repo tag for each Feature or Template release.
devcontainer-cli-version:
required: false
default: ''
description: >-
Override the version of the devcontainer CLI to use. Defaults to the latest published version.
# Feature specific inputs
publish-features:
required: false
Expand Down

0 comments on commit 2b5c0e2

Please sign in to comment.