From 103b470d9af5235dd748e4935afdd3f18348c6ea Mon Sep 17 00:00:00 2001 From: saisatishkarra Date: Fri, 12 Jan 2024 10:17:49 -0600 Subject: [PATCH] fix for publishing lua check report for dependabot branches without separate workflow --- code-check-actions/lua-lint/action.yml | 37 +++++++++++++++++--------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/code-check-actions/lua-lint/action.yml b/code-check-actions/lua-lint/action.yml index 1f4b0b44..1cd56c79 100644 --- a/code-check-actions/lua-lint/action.yml +++ b/code-check-actions/lua-lint/action.yml @@ -35,20 +35,33 @@ runs: # run: | # cat luacheck_${{github.sha}}.xml - # when using the regular GITHUB_TOKEN, the check-run created by this step will be assigned to a - # random workflow in the GH UI. to prevent this, we can force the check-run to be created in a separate - # check-suite, which is created automatically if we use the credentials of a GitHub App - # Ref: https://github.com/EnricoMi/publish-unit-test-result-action/issues/181 - # Publishing: https://github.com/EnricoMi/publish-unit-test-result-action#publishing-test-results +# To avoid: https://github.com/EnricoMi/publish-unit-test-result-action?tab=readme-ov-file#support-fork-repositories-and-dependabot-branches - name: Luacheck Report - uses: EnricoMi/publish-unit-test-result-action@v2 + uses: turing85/publish-report@v1 if: always() with: - files: | - luacheck_${{github.sha}}.xml - check_name: Luacheck Report - comment_mode: always - action_fail: false - fail_on: 'nothing' # Explicitly don't fail reporting check based on test results + cancel-workflow-on-error: 'false' + checkout: 'false' + comment-enabled: 'true' + recreate-comment: 'true' + report-fail-on-error: 'false' # to fail when tests failed + report-name: Luacheck Report + report-path: 'luacheck_${{github.sha}}.xml' + + # # when using the regular GITHUB_TOKEN, the check-run created by this step will be assigned to a + # # random workflow in the GH UI. to prevent this, we can force the check-run to be created in a separate + # # check-suite, which is created automatically if we use the credentials of a GitHub App + # # Ref: https://github.com/EnricoMi/publish-unit-test-result-action/issues/181 + # # Publishing: https://github.com/EnricoMi/publish-unit-test-result-action#publishing-test-results + # - name: Luacheck Report + # uses: EnricoMi/publish-unit-test-result-action@v2 + # if: always() + # with: + # files: | + # luacheck_${{github.sha}}.xml + # check_name: Luacheck Report + # comment_mode: always + # action_fail: false + # fail_on: 'nothing' # Explicitly don't fail reporting check based on test results