Skip to content

Commit

Permalink
Add input to set verbose flag in GitHub Actions (#17)
Browse files Browse the repository at this point in the history
* Add input to set verbose flag in GitHub Actions

* Run prepare build step

* Update readme
  • Loading branch information
Stefan Buck authored Sep 8, 2021
1 parent 6277fd2 commit 3f0da53
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ None. Prints out the validated YAML on success. Prints out errors on invalid YAM

**Optional** Path to the catalog-info.yaml file to validate. Defaults to `catalog-info.yaml` at the root of the repository.

#### `verbose`

**Optional** Specify whether the output should be verbose. Default `true`.

### Outputs

None. Prints out the validated YAML on success. Prints out errors on invalid YAML
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: 'path to the catalog-info.yaml file to validate'
required: true
default: "catalog-info.yaml"
verbose:
description: 'Specify whether the output should be verbose'
required: false
default: "true"
runs:
using: 'node12'
main: 'dist/index.js'
5 changes: 5 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50779,6 +50779,11 @@ async function main() {
options.github = true;
}

const ghVerbose = core.getInput('verbose');
if (ghVerbose) {
options.verbose = ghVerbose === 'true';
}

// add files specified as arguments
files = files.concat(argv._);

Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ async function main() {
options.github = true;
}

const ghVerbose = core.getInput('verbose');
if (ghVerbose) {
options.verbose = ghVerbose === 'true';
}

// add files specified as arguments
files = files.concat(argv._);

Expand Down

0 comments on commit 3f0da53

Please sign in to comment.