diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 1df668a..bf4d1a6 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -38,7 +38,7 @@ jobs: run: | python ${LOG_TO_CS} ${RAW_LOG} ${CS_XML} - name: Convert Raw Log to Checkstyle format (launch action) - uses: mdeweerd/logToCheckStyle@test5 + uses: mdeweerd/logToCheckStyle@test6 if: ${{ failure() }} with: in: ${{ env.RAW_LOG }} diff --git a/README.md b/README.md index e42d6e3..42bd148 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ optional arguments: ```yaml - name: Convert Raw Log to Checkstyle format (launch action) - uses: mdeweerd/logToCheckStyle@test5 + uses: mdeweerd/logToCheckStyle@test6 if: ${{ failure() }} with: in: ${{ env.RAW_LOG }} diff --git a/action.yml b/action.yml index 24c1c92..17c4181 100644 --- a/action.yml +++ b/action.yml @@ -29,5 +29,5 @@ runs: run: | echo ::group::Analyze log file python -m pip install regex - ./entrypoint.sh '${{ inputs.in }}' '${{ inputs.out }}' '${{ inputs.root }}', '${{ inputs.annotate }}' + '${{ github.action_path }}/entrypoint.sh' '${{ inputs.in }}' '${{ inputs.out }}' '${{ inputs.root }}', '${{ inputs.annotate }}' echo ::endgroup:: diff --git a/entrypoint.sh b/entrypoint.sh index 0d2be8c..07fe478 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,10 @@ #!/bin/sh -l ANNOTATE="" -echo "CMD: $0/$(realpath "$0") PWD: $PWD ARGS: ${@[*]}" +LOGTOCS=$(realpath "$(dirname "$0")/logToCs.py") +if [[ "$(uname -a)" =~ "MINGW"* ]] || [[ "$(uname -a)" =~ "CYGWIN"* ]] ; then + LOGTOCS=$(cygpath -w "${LOGTOCS}") +fi + [ "$3" = "true" ] && ANNOTATE="--github-annotate" [ "$3" = "false" ] && ANNOTATE="--no-github-annotate" [ "$3" = "" ] && python ./logToCs.py "$1" "$2" --root "$PWD" && exit 0