47
47
type : string
48
48
schedule :
49
49
- cron : ' 0 0 * * *' # Every day at midnight
50
-
50
+
51
51
jobs :
52
52
run-tests :
53
53
name : Run tests
@@ -183,3 +183,48 @@ jobs:
183
183
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Yubico/index.json"
184
184
dotnet nuget push $core --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}
185
185
dotnet nuget push $yubikey --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}
186
+
187
+ build-summary :
188
+ name : Build summary
189
+ runs-on : ubuntu-latest
190
+ needs : [build-artifacts, publish-internal, upload-docs] # Add upload-docs to needs
191
+ if : always() # Run this job even if other jobs fail
192
+ steps :
193
+ - name : Generate build summary
194
+ env :
195
+ # Pass job results and outputs into the step's environment
196
+ RUN_TESTS_RESULT : ${{ needs.run-tests.result }}
197
+ BUILD_ARTIFACTS_RESULT : ${{ needs.build-artifacts.result }}
198
+ UPLOAD_DOCS_RESULT : ${{ needs.upload-docs.result }}
199
+ PUBLISH_INTERNAL_RESULT : ${{ needs.publish-internal.result }}
200
+ DOCS_IMAGE_TAG : ${{ needs.upload-docs.outputs.image-tag }}
201
+ run : |
202
+ echo "## Build Summary" >> $GITHUB_STEP_SUMMARY
203
+ echo "" >> $GITHUB_STEP_SUMMARY
204
+ echo "### Job Status" >> $GITHUB_STEP_SUMMARY
205
+ echo "| Job | Status |" >> $GITHUB_STEP_SUMMARY
206
+ echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
207
+ echo "| Run tests | **${{ env.RUN_TESTS_RESULT }}** |" >> $GITHUB_STEP_SUMMARY
208
+ echo "| Build artifacts | **${{ env.BUILD_ARTIFACTS_RESULT }}** |" >> $GITHUB_STEP_SUMMARY
209
+ echo "| Upload docs | **${{ env.UPLOAD_DOCS_RESULT }}** |" >> $GITHUB_STEP_SUMMARY
210
+ echo "| Publish to internal NuGet | **${{ env.PUBLISH_INTERNAL_RESULT }}** |" >> $GITHUB_STEP_SUMMARY
211
+ echo "" >> $GITHUB_STEP_SUMMARY
212
+
213
+ echo "### Built Artifacts" >> $GITHUB_STEP_SUMMARY
214
+ echo "Links to artifacts produced by this build run:" >> $GITHUB_STEP_SUMMARY
215
+ echo "" >> $GITHUB_STEP_SUMMARY
216
+ echo "- [Documentation log](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/Documentation_log)" >> $GITHUB_STEP_SUMMARY
217
+ echo "- [Documentation Site](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/Documentation)" >> $GITHUB_STEP_SUMMARY
218
+ echo "- [Nuget Packages](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/Nuget_Packages)" >> $GITHUB_STEP_SUMMARY
219
+ echo "- [Symbols Packages](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/Symbols_Packages)" >> $GITHUB_STEP_SUMMARY
220
+ echo "- [Assemblies](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/Assemblies)" >> $GITHUB_STEP_SUMMARY
221
+ echo "" >> $GITHUB_STEP_SUMMARY
222
+
223
+ # Conditionally add the Docker image tag to the summary if the upload-docs job was successful
224
+ if [ "${{ env.UPLOAD_DOCS_RESULT }}" == "success" ]; then
225
+ echo "### Documentation Docker Image" >> $GITHUB_STEP_SUMMARY
226
+ echo "A new documentation Docker image was pushed with the tag:" >> $GITHUB_STEP_SUMMARY
227
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
228
+ echo "${{ env.DOCS_IMAGE_TAG }}" >> $GITHUB_STEP_SUMMARY
229
+ echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
230
+ fi
0 commit comments