Skip to content

Commit

Permalink
Add note about configuring the CLI via environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Piccirello authored Oct 6, 2021
1 parent 041d0dc commit 3f09ae1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,24 @@ uses: dopplerhq/cli-action@v1
```

You can see a live example of this Action [here](https://github.com/DopplerHQ/cli/blob/master/.github/workflows/cli-action.yml).

## Configuration

In most cases, you'll need to provide the CLI with an auth token. You can do so via the `DOPPLER_TOKEN` environment variable. In the below example, the token is retrieved from [GitHub secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets).

```yaml
name: Example action

on: [push]

jobs:
my-job:
runs-on: ubuntu-latest
steps:
- name: Install CLI
uses: dopplerhq/cli-action@v1
- name: Do something with the CLI
run: doppler secrets --only-names
env:
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}
```

0 comments on commit 3f09ae1

Please sign in to comment.