Skip to content

Commit

Permalink
Support dryrun in action
Browse files Browse the repository at this point in the history
  • Loading branch information
babarot committed Feb 8, 2020
1 parent a6c3738 commit 56d7d91
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
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: 'Import existing labels if enabled'
required: false
default: 'false'
dryrun:
description: 'Just show what would be done if enabled'
required: false
default: 'false'
runs:
using: 'docker'
image: 'Dockerfile'
15 changes: 9 additions & 6 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
#!/bin/bash

config=${INPUT_CONFIG}
args=()

if ${INPUT_IMPORT:-false}; then
args+=("--import")
fi

import=${INPUT_IMPORT:-false}
if ${import}; then
github-labeler --import --config=${config}
exit ${?}
if ${INPUT_DRYRUN:-false}; then
args+=("--dry-run")
fi

github-labeler --config=${config}
config=${INPUT_CONFIG}
github-labeler --config=${config} ${args[@]}

0 comments on commit 56d7d91

Please sign in to comment.