Skip to content

Commit

Permalink
feat: add support for running action within a subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 authored Jan 17, 2024
1 parent d9a97a5 commit 3295efc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,20 @@ INPUT_SEPARATOR="${INPUT_SEPARATOR//\\n/%0A}"
INPUT_SEPARATOR="${INPUT_SEPARATOR//\\r/%0D}"

echo "::group::verify-changed-files"

echo "::debug::Separator: $INPUT_SEPARATOR"

if [[ -n $INPUT_PATH ]]; then
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"

echo "Resolving repository path: $REPO_DIR"
if [[ ! -d "$REPO_DIR" ]]; then
echo "::error::Invalid repository path: $REPO_DIR"
echo "::endgroup::"
exit 1
fi
cd "$REPO_DIR"
fi

GIT_STATUS_EXTRA_ARGS="-u --porcelain"

if [[ "$INPUT_MATCH_GITIGNORE_FILES" == "true" ]]; then
Expand Down

0 comments on commit 3295efc

Please sign in to comment.