Skip to content

fix(ci): update workflow .NET SDK from 6.0.200 to 8.0.x#265

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-github-actions-workflow
Draft

fix(ci): update workflow .NET SDK from 6.0.200 to 8.0.x#265
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-github-actions-workflow

Conversation

Copy link
Copy Markdown

Copilot AI commented May 25, 2026

CI was broken because the workflow installed .NET 6.0.200 while src/Samples/MediaReceiver/MediaReceiver.csproj targets net8.0.

Changes

  • .github/workflows/build.yml
    • actions/checkout: v2v4
    • actions/setup-dotnet: v1v4, dotnet-version: 6.0.2008.0.x
    • Removed unnecessary sudo from dotnet test step
Original prompt

Create a pull request in repository takenet/blip-sdk-csharp based on master to fix the GitHub Actions workflow so it supports the repository changes that introduced a net8.0 target in src/Samples/MediaReceiver/MediaReceiver.csproj.

Context:

  • The repository workflow file is .github/workflows/build.yml.
  • The current workflow installs .NET SDK 6.0.200 using actions/setup-dotnet@v1.
  • The sample project src/Samples/MediaReceiver/MediaReceiver.csproj targets net8.0.
  • This mismatch is likely causing the failing GitHub Actions run referenced by the user.

Requested change:

  • Update the workflow to use a modern setup-dotnet action and install a .NET 8 SDK compatible with net8.0.
  • Keep the workflow focused on fixing CI for the existing solution build/test.
  • Preserve repository conventions.

Requirements:

  • Pull request title must comply with Conventional Commits.
  • All projects must use Semantic Release and follow Conventional Commits.
  • The PR title should accurately reflect the change, likely using fix(ci): ....

Suggested implementation:

  • In .github/workflows/build.yml, update actions/checkout to a maintained version if appropriate.
  • Replace actions/setup-dotnet@v1 + dotnet-version: 6.0.200 with a supported actions/setup-dotnet version and .NET 8 SDK (for example 8.0.x).
  • Ensure the build and test commands still run against src/Take.Blip.Client.sln.
  • Do not make unrelated code changes.

Deliverable:

  • Open a PR from a new branch against master with a Conventional Commits PR title.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: como corrigir o problema?

Assistant: O problema mais provável é incompatibilidade entre o SDK do workflow e o TargetFramework do projeto sample.

Seu workflow está instalando .NET 6.0.200, mas o arquivo src/Samples/MediaReceiver/MediaReceiver.csproj usa net8.0. Então o build/test no GitHub Actions tende a falhar porque o runner não tem o SDK 8 necessário. No workflow atual, a linha relevante é esta: dotnet-version: 6.0.200. Além disso, o projeto sample está explicitamente em net8.0.

- name: Setup .NET Core
  uses: actions/setup-dotnet@v1
  with:
    dotnet-version: 6.0.200
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net8.0</TargetFrameworks>

Como corrigir

Você tem 2 opções:

Opção 1 — Atualizar o workflow para .NET 8

Se esse sample deve mesmo continuar em net8.0, ajuste o GitHub Actions para instalar .NET 8.

Exemplo:

name: .NET Core

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v4

    - name: Setup .NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x

    - name: Install dependencies
      run: dotnet restore src/Take.Blip.Client.sln

    - name: Build
      run: dotnet build src/Take.Blip.Client.sln --configuration Release --no-restore

    - name: Test
      run: dotnet test src/Take.Blip.Client.sln --no-build --verbosity normal

Essa é a correção certa se o repositório já passou a suportar .NET 8.


Opção 2 — Voltar o sample para .NET 6

Se o repositório ainda está padronizado em .NET 6, então o sample MediaReceiver não deveria estar em net8.0. Nesse caso, troque para:

<TargetFrameworks>net6.0</TargetFrameworks>

Essa opção faz sentido se o resto da solução ainda depende de .NET 6.


O que eu recomendo neste caso

Pelo que vi, o workflow do repositório inteiro ainda está configurado para .NET 6, então a mudança para net8.0 nesse sample provavelmente foi a causa do erro.
Assim, a correção mais segura para o PR #263 é:

  1. decidir uma versão alvo única para a solução,
  2. se a intenção não era migrar tudo para .NET 8, reverter MediaReceiver.csproj para net6.0,
  3. se a intenção era migrar, então atualizar o workflow e validar todos os projetos da solution.

Outro ponto importante no seu PR

O título atual do PR é:

chore: Updated dependencies and refactored method signature [AB#1025663](https://curupira.visualstudio.com/6cd5c1b3-c813-4ff6-b562-e74fb11ea8c2/_workitems/edit/1025663)

Pelas regras que você informou, o título precisa seguir Conventional Commits com formato consistente, por exemplo:

  • chore(deps): update dependencies and refactor method signature
  • ou fix(build): align workflow SDK with target framework

Se a mudança principal for corrigir o pipeline, eu usaria:

  • fix(ci): align .NET SDK version with project target framework

Se quiser, eu também posso...

This pull request was created from Copilot chat.

Agent-Logs-Url: https://github.com/takenet/blip-sdk-csharp/sessions/4ebbec0e-49c5-4cb0-8e57-c51e92d0939d

Co-authored-by: AcacioFernando <8922023+AcacioFernando@users.noreply.github.com>
Copilot AI changed the title [WIP] fix: update GitHub Actions to support net8.0 target fix(ci): update workflow .NET SDK from 6.0.200 to 8.0.x May 25, 2026
Copilot AI requested a review from AcacioFernando May 25, 2026 13:17
@cyber-sast
Copy link
Copy Markdown

cyber-sast commented May 25, 2026

Logo
Checkmarx One – Scan Summary & Details68e9edb9-4b7d-430b-9545-d828fbb20884


Policy Management Violations (2)
Policy Name: Politica Geral - Exploitable Path
  • Rule Name: Vulnerabilidade encontrada! Consulte o canal #checkmarx-sca-alerts no Slack.
    Scanner: SCA
    Entity: Vulnerability
    Conditions(s): TestDependencyPackage Equal false, VulnerabilityExploitablePath Equal true
Policy Name: CVE-2024-21907 The following violations of your team's AppSec policy rules were identified in this project. Since 'Break Build' is enabled for these rules, you must resolve these issues before the Pull Request can be merged.
  • Rule Name: Biblioteca Newtonsoft.Json vulneravel. Atualizar para a versão 13.0.1
    Scanner: SCA
    Entity: Vulnerability
    Conditions(s): DevDependencyPackage Equal false, VulnerabilityCve Equal "CVE-2024-21907"

Communicate with Checkmarx by submitting a PR comment with @Checkmarx followed by one of the supported commands. Learn about the supported commands here.

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.

3 participants