Skip to content

Commit

Permalink
adding cleanup variable
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Aug 20, 2020
1 parent feebb28 commit e067081
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ For help building your query, it's recommended to try your search in the
is not defined, the update will be skipped, and you will be required to already
have a users.txt file.

### `cleanup`

If defined as anything, clean up the previous collection folder before generating
new events. If not defined, skip cleanup entirely (old events will be preserved).

### `exclude_users_file`

**Optional** The path to the exclude-users.txt (or otherwise named) file that has
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ inputs:
description: 'The relative path in the repository for the exclude-users.txt (or other named file) for users to not include if discovered programatically.'
required: true
default: 'exclude-users.txt'
cleanup:
description: 'If defined, clean up the previous folder (removing previous events) If not defined, skip cleanup.'
required: false
query:
description: 'A user query to run before updating the users_file. If left blank, will not be updated.'
required: false
Expand Down
6 changes: 4 additions & 2 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ if [ ! -d "/github/workspace/docs" ]; then
fi

# Cleanup old set of first issues
printf "Cleaning up previous events...\n"
rm -rf "/github/workspace/docs/${INPUT_COLLECTION}"
if [ ! -z "${INPUT_CLEANUP}" ]; then
printf "Cleaning up previous events...\n"
rm -rf "/github/workspace/docs/${INPUT_COLLECTION}"
fi
export INPUT_COLLECTION

# Generate Stanford Issues
Expand Down

0 comments on commit e067081

Please sign in to comment.