zyborg / dotnet-tests-report

GitHub Action to run .NET Core tests and generate report attached to Workflow Run
MIT License
112 stars 36 forks source link

Support passing in SHA of commit to associate check #29

Open flcdrg opened 2 years ago

flcdrg commented 2 years ago

If you're separating out workflows like in https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions#handling-push-events then you might want to run this action from a workflow triggered by the workflow_run event.

In that case the current logic doesn't pick up the correct commit SHA. In this situation it would be great to have a property that can be set to the SHA..

eg.

        with:
          report_name: Unit Tests
          report_title: Unit Tests
          github_token: ${{ secrets.GITHUB_TOKEN }}
          test_results_path: ./TestResults.trx
          sha: ${{ github.event.workflow_run.head_sha }}