Skip to content

Commit

Permalink
Add action support for preserve-block-position (#351)
Browse files Browse the repository at this point in the history
Closes #350

Co-authored-by: Tansy Arron <tansy.arron@ibm.com>
  • Loading branch information
TansyArron and Tansy Arron authored Mar 23, 2023
1 parent 2371d8a commit a544321
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ inputs:
description: 'The output path and name of the file, (default: CODEOWNERS)'
required: false
default: 'CODEOWNERS'
preserve-block-position:
description: Keep the generated block in the same position it was found in the CODEOWNERS file (if present). Useful for when you make manual additions.
required: false
default: 'false'
version:
description: codeowners-generator version. It will default to the latest in npm otherwise'
required: false

runs:
using: 'composite'
steps:
Expand Down Expand Up @@ -53,6 +58,10 @@ runs:
ARGS_INPUT+=("--check")
fi
if [ ! -z "${{inputs.preserve-block-position}}" ]; then
ARGS_INPUT+="("--preserve-block-position")
fi
if [ ! -z "${{inputs.version}}" ]; then
VERSION="${{inputs.version}}"
fi
Expand Down

0 comments on commit a544321

Please sign in to comment.