From 76623b16fbf3ec61d9a88c56dc90944770ab8ecd Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sun, 12 May 2024 12:28:21 -0600 Subject: [PATCH 1/2] fix: bug resolving windows paths --- entrypoint.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 2c66d12..fa1931e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,8 +12,14 @@ echo "::debug::Separator: $INPUT_SEPARATOR" git config --global core.quotepath "$INPUT_QUOTEPATH" +OS=$(uname -s) + if [[ -n $INPUT_PATH ]]; then - REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH" + if [[ "$OS" == "NT"* ]] || [[ "$OS" == "MINGW"* ]] || [[ "$OS" == *"MSYS"* ]]; then + REPO_DIR="$GITHUB_WORKSPACE\\$INPUT_PATH" + else + REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH" + fi echo "Resolving repository path: $REPO_DIR" if [[ ! -d "$REPO_DIR" ]]; then From 9830d45d7c7e9f6c6ff20312dd0e476d9c277e78 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Sun, 12 May 2024 12:36:20 -0600 Subject: [PATCH 2/2] Update test.yml --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de8a1e0..bdedcdf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -175,6 +175,8 @@ jobs: - name: Test deletion of test/new.txt uses: ./ + with: + path: test id: deleted_file_test - name: Show output @@ -182,12 +184,12 @@ jobs: echo "Changed files: ${{ steps.deleted_file_test.outputs.changed_files }}" - name: Display deleted file test result - if: "contains(steps.deleted_file_test.outputs.changed_files, 'test/new.txt')" + if: "contains(steps.deleted_file_test.outputs.changed_files, 'new.txt')" run: | echo "Deletion detected: ${{ steps.deleted_file_test.outputs.changed_files }}" - name: Verify Deletion of test/new.txt - if: "!contains(steps.deleted_file_test.outputs.changed_files, 'test/new.txt')" + if: "!contains(steps.deleted_file_test.outputs.changed_files, 'new.txt')" run: | echo "No Deletion detected: (Not expected)" exit 1