Skip to content

Commit 742ef93

Browse files
authored
Uploaded job summary artifact (#36461)
1 parent 061f4e9 commit 742ef93

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/breaking-change-code.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- name: Swagger Breaking Change - Analyze Code
2828
id: swagger-breaking-change-analyze-code
2929
run: |
30+
echo "summary=$GITHUB_STEP_SUMMARY" >> "$GITHUB_OUTPUT"
3031
npm exec --no -- openapi-diff-runner \
3132
--spec-repo-path "$GITHUB_WORKSPACE" \
3233
--pr-source-branch "$GITHUB_HEAD_REF" \
@@ -55,3 +56,13 @@ jobs:
5556
with:
5657
name: "${{ steps.swagger-breaking-change-analyze-code.outputs.versioningReviewLabelName }}"
5758
value: "${{ steps.swagger-breaking-change-analyze-code.outputs.versioningReviewLabelValue == 'true' }}"
59+
60+
# Used by other workflows like set-status
61+
- name: Set job-summary artifact
62+
if: ${{ always() && steps.swagger-breaking-change-analyze-code.outputs.summary }}
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: job-summary
66+
path: ${{ steps.swagger-breaking-change-analyze-code.outputs.summary }}
67+
# If the file doesn't exist, just don't add the artifact
68+
if-no-files-found: ignore

.github/workflows/breaking-change-cross-version-code.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- name: Breaking Change(Cross-Version) - Analyze Code
2828
id: breaking-change-cross-version-analyze-code
2929
run: |
30+
echo "summary=$GITHUB_STEP_SUMMARY" >> "$GITHUB_OUTPUT"
3031
npm exec --no -- openapi-diff-runner \
3132
--run-type "CrossVersion" \
3233
--spec-repo-path "$GITHUB_WORKSPACE" \
@@ -56,3 +57,13 @@ jobs:
5657
with:
5758
name: "${{ steps.breaking-change-cross-version-analyze-code.outputs.versioningReviewLabelName }}"
5859
value: "${{ steps.breaking-change-cross-version-analyze-code.outputs.versioningReviewLabelValue == 'true' }}"
60+
61+
# Used by other workflows like set-status
62+
- name: Set job-summary artifact
63+
if: ${{ always() && steps.breaking-change-cross-version-analyze-code.outputs.summary }}
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: job-summary
67+
path: ${{ steps.breaking-change-cross-version-analyze-code.outputs.summary }}
68+
# If the file doesn't exist, just don't add the artifact
69+
if-no-files-found: ignore

0 commit comments

Comments
 (0)