chia7712 commented on code in PR #17140: URL: https://github.com/apache/kafka/pull/17140#discussion_r1750727518
########## .github/workflows/ci-complete.yml: ########## @@ -44,11 +60,48 @@ jobs: with: java-version: ${{ matrix.java }} develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }} - - uses: actions/download-artifact@v4 + - name: Download build scan archive + id: download-build-scan + uses: actions/download-artifact@v4 + continue-on-error: true with: github-token: ${{ github.token }} run-id: ${{ github.event.workflow_run.id }} name: build-scan-test-${{ matrix.java }} - path: ~/.gradle/build-scan-data - - name: Publish scan - run: ./gradlew --info buildScanPublishPrevious + path: ~/.gradle/build-scan-data # This is where Gradle buffers unpublished build scan data when --no-scan is given + - name: Handle missing scan + if: ${{ steps.download-build-scan.outcome == 'failure' }} + run: | + echo "Could not download build scans from ${{ github.event.workflow_run.html_url }} " >> $GITHUB_STEP_SUMMARY + - name: Publish Scan + id: publish-build-scan + continue-on-error: true + if: ${{ steps.download-build-scan.outcome == 'success' }} + run: | + ./gradlew --info buildScanPublishPrevious > gradle.out + SCAN_URL=$(grep '^https://.*$' gradle.out) + cat gradle.out + echo "Published build scan to $SCAN_URL" + echo "build-scan-url=$SCAN_URL" >> $GITHUB_OUTPUT + - name: Handle failed publish + if: ${{ steps.publish-build-scan.outcome == 'failure' }} + uses: ./.github/actions/gh-api-update-status + with: + gh-token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.event.workflow_run.head_repository.full_name }} + commit_sha: ${{ github.event.workflow_run.head_sha }} + url: '${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}' Review Comment: > Aesthetically speaking, the composite action looks nicer IMO. agree :smile: -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org