Skip to content

Commit f9396a7

Browse files
Update document
1 parent 8da1150 commit f9396a7

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ dive action is an action that allows developers who develop Docker image to run
1313

1414
### Inputs
1515

16-
| Name | Type | Required | Default | Description |
17-
| ----------- | ------ | -------- | ------------------------------------ | ---------------------------------------------------------------------------- |
18-
| image | String | true | | Image to analyze |
19-
| config-file | String | false | `${{ github.workspace }}/.dive.yaml` | Path to [dive config file](https://github.com/wagoodman/dive#ci-integration) |
16+
| Name | Type | Required | Default | Description |
17+
| ------------ | ------ | -------- | ------------------------------------ | ---------------------------------------------------------------------------- |
18+
| image | String | true | | Image to analyze |
19+
| config-file | String | false | `${{ github.workspace }}/.dive.yaml` | Path to [dive config file](https://github.com/wagoodman/dive#ci-integration) |
20+
| github-token | String | false | | GitHub token to post PR comment on dive failure |
2021

2122
### Workflow
2223

@@ -39,6 +40,7 @@ jobs:
3940
with:
4041
image: "sample:latest"
4142
config-file: ${{ github.workspace }}/.dive-ci.yml
43+
github-token: ${{ secrets.GITHUB_TOKEN }}
4244
```
4345
4446
### Config file

dist/index.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ async function run(): Promise<void> {
8585
}
8686

8787
const token = core.getInput('github-token')
88+
if (!token) {
89+
return
90+
}
8891
const octokit = github.getOctokit(token)
8992
const comment = {
9093
...github.context.issue,

0 commit comments

Comments
 (0)