-
Notifications
You must be signed in to change notification settings - Fork 8
Enable TUnit test report artifact upload in GitHub Actions #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -34,6 +34,13 @@ jobs: | |||||||||||||||||||||||||
| - name: Build with dotnet | ||||||||||||||||||||||||||
| run: dotnet build --configuration Release --no-restore /p:AccessToNugetFeed=false | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Expose GitHub Actions Runtime | ||||||||||||||||||||||||||
| uses: actions/github-script@v7 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| script: | | ||||||||||||||||||||||||||
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']); | ||||||||||||||||||||||||||
| core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']); | ||||||||||||||||||||||||||
|
Comment on lines
+37
to
+42
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
Comment on lines
+41
to
+43
|
||||||||||||||||||||||||||
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']); | |
| core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']); | |
| const runtimeToken = process.env['ACTIONS_RUNTIME_TOKEN']; | |
| if (runtimeToken) { | |
| core.setSecret(runtimeToken); | |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', runtimeToken); | |
| } | |
| const resultsUrl = process.env['ACTIONS_RESULTS_URL']; | |
| if (resultsUrl) { | |
| core.exportVariable('ACTIONS_RESULTS_URL', resultsUrl); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process.env['ACTIONS_RUNTIME_TOKEN']can be undefined/empty depending on runner/event context; exporting an empty value can lead downstream tooling to treat the runtime as available but fail later. Consider guarding the export (only export when the value is truthy) and callingcore.setSecret(...)for the token before exporting so it’s masked if anything logs environment variables.