Skip to content

Commit f617ba1

Browse files
authored
Merge pull request #2 from compliance-framework/chore-update-readme
Update readme with information on environment variables
2 parents c755f16 + eede1b0 commit f617ba1

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,31 @@ goreleaser release --snapshot --clean
2121

2222
## Usage
2323

24-
You can use this plugin by passing it to the compliiance agent
24+
You can use this plugin by passing it to the compliance agent
2525

2626
```shell
2727
agent --plugin=[PATH_TO_YOUR_BINARY]
2828
```
2929

3030
## Plugin Configuration
3131

32-
The plugin configuration must be created and managed by the agent, but expects the following configuration keys to be set, otherwise it will fail
32+
The plugin configuration must be created and managed by the agent, but expects the following configuration keys to be set, otherwise it will fail.
33+
34+
Plugins read their configuration from environment variables, when the path matches the yaml structure.
35+
36+
In the example above, setting an empty token, and an environment variable `CCF_PLUGINS_GITHUB_CONFIG_TOKEN` will use the environment variable.
37+
38+
```shell
39+
export CCF_PLUGINS_GITHUB_CONFIG_TOKEN="github_pat_1234..."
40+
```
41+
3342
```yaml
3443
...
3544
plugins:
36-
github:
37-
config:
38-
token: github_pat_1234.... # The configured Github PAT for the organization scopes
39-
organization: test-org # The name of the organization
45+
github:
46+
config:
47+
token: "" # Will be read from the CCF_PLUGINS_GITHUB_CONFIG_TOKEN environment variable
48+
organization: test-org # The name of the organization
4049
...
4150
```
4251

0 commit comments

Comments
 (0)