Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs on pinning CLI version #202

Merged
merged 1 commit into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
samruddhikhandale marked this conversation as resolved.
Show resolved Hide resolved
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
Loading