Skip to content

Commit

Permalink
Add action input for fail_on_error (#107)
Browse files Browse the repository at this point in the history
Fixes: 106

Signed-off-by: Galo Navarro <[email protected]>
  • Loading branch information
srvaroa authored Nov 11, 2023
1 parent c20e19e commit 6a5cb2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ description: 'All-in-one action to manage labels in PRs and Issues based on many
author: 'Galo Navarro <[email protected]>'
inputs:
config_path:
description: 'Path for labeling rules'
default: '.github/labeler.yml'
description: 'Path for labeling rules'
use_local_config:
default: 'false'
description: 'By default the action will use the configuration file set in the default branch of the repository. When set to true, the action will instead use the configuration found in the local checkout of the repository.'
fail_on_error:
default: 'false'
description: 'By default the action will never fail when an error is found during the evaluation of the labels. This is done in order to avoid disrupting CI pipelines with non-critical tasks. To override this behaviour, set this property to `true` so that any error in the evaluation of labels causes a failure of the workflow.'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
2 changes: 1 addition & 1 deletion cmd/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
func main() {

// Determine if we want the action to fail on error, or be silent to
// prevent blocking Ci pipelines
// prevent blocking CI pipelines
failCode := 0
failOnError, err := strconv.ParseBool(os.Getenv("INPUT_FAIL_ON_ERROR"))
if err != nil {
Expand Down

0 comments on commit 6a5cb2b

Please sign in to comment.