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

Update README with required permissions info #219

Merged
merged 4 commits into from
Aug 27, 2024
Merged
Changes from 1 commit
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
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,35 @@ 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.

### Permissions

Running this action requires the following [permissions](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token) be granted:

- `packages: write`
- `contents: write`
- `pull-requests: write`

For example:

```yaml
jobs:
deploy:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
pull-requests: write
joshspicer marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@v3

- name: "Publish Templates"
uses: devcontainers/action@v1
with:
publish-templates: "true"
base-path-to-templates: "./src"
```

### 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:
Expand Down
Loading