Skip to content

Add GitHub Actions artifact upload support for issue reports #583

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

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 5, 2025

Implements artifact upload functionality for GitHub Actions builds, enabling issue reports to be uploaded as build artifacts similar to Azure DevOps and AppVeyor support.

Changes Made

Core Implementation

  • GitHubActionsBuildServer.cake: Updated PublishIssuesArtifacts method to set GitHub Actions output variables
  • GitHubActionsBuildServer.cs: Mirror implementation for Cake.Frosting variant with proper imports

Features

Modern GitHub Actions Support: Uses $GITHUB_OUTPUT environment file when available
Backward Compatibility: Falls back to ::set-output workflow commands for older runners
Configuration Respect: Honors ShouldPublishFullIssuesReport and ShouldPublishSarifReport parameters
File Validation: Only sets outputs when report files actually exist

How It Works

The implementation sets GitHub Actions output variables that workflows can consume:

- name: Run Build with Issues
  id: build
  run: dotnet cake --target=Publish-IssuesArtifacts

- name: Upload Issues Report
  if: steps.build.outputs.full-issues-report-path
  uses: actions/upload-artifact@v4
  with:
    name: Issues Report
    path: ${{ steps.build.outputs.full-issues-report-path }}

- name: Upload SARIF Report  
  if: steps.build.outputs.sarif-report-path
  uses: actions/upload-artifact@v4
  with:
    name: SARIF Report
    path: ${{ steps.build.outputs.sarif-report-path }}

Output Variables

  • full-issues-report-path: Path to HTML issues report
  • sarif-report-path: Path to SARIF report

Testing

Comprehensive testing performed including:

  • Normal operation with both report types
  • Fallback mode compatibility
  • Edge cases (missing files, disabled publishing)
  • Syntax validation and compilation

This brings GitHub Actions support in line with existing Azure DevOps and AppVeyor artifact upload capabilities.

Fixes #376.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…and Frosting versions

Co-authored-by: pascalberger <2190718+pascalberger@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Upload full issue report as build artifact when running on GitHub Actions Add GitHub Actions artifact upload support for issue reports Jul 5, 2025
@Copilot Copilot AI requested a review from pascalberger July 5, 2025 17:30
Copilot finished work on behalf of pascalberger July 5, 2025 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upload full issue report as build artifact when running on GitHub Actions
2 participants