Conversation
…tifact v2→v4 Co-authored-by: Skyzi000 <38061609+Skyzi000@users.noreply.github.com>
actions/cache: v1. Please update your workflow to use v3/v4 of actions/cache to avoid interruptions. Learn more: https://github.b...Updated build workflow to use dotnet-sonarscanner and removed JDK setup.
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
There was a problem hiding this comment.
Pull Request Overview
This PR updates deprecated GitHub Actions in the CI/CD workflow to their latest supported versions to resolve build failures and maintain workflow compatibility.
Key changes:
- Updated actions/cache from v1 to v4
- Updated actions/upload-artifact and actions/download-artifact from v2 to v4
- Refactored SonarCloud integration to use global tool installation instead of caching
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~\sonar\cache |
There was a problem hiding this comment.
The cache path uses Windows-style path syntax (~\sonar\cache) but should use forward slashes for cross-platform compatibility. Change to ~/sonar/cache.
| uses: actions/cache@v4 | |
| with: | |
| path: ~\sonar\cache | |
| path: ~/sonar/cache |
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Win-x64-${{ matrix.configuration }}-${{ github.sha }} | ||
| path: bin\x64\${{ matrix.configuration }}\net6.0-windows\win-x64\publish\ |
There was a problem hiding this comment.
The artifact path uses Windows-style backslashes which may cause issues. Consider using forward slashes: bin/x64/${{ matrix.configuration }}/net6.0-windows/win-x64/publish/
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Win-x64-${{ matrix.configuration }}-${{ github.sha }} | |
| path: bin\x64\${{ matrix.configuration }}\net6.0-windows\win-x64\publish\ | |
| path: bin/x64/${{ matrix.configuration }}/net6.0-windows/win-x64/publish/ |
This PR fixes the GitHub Actions workflow failures caused by deprecated action versions that are no longer supported.
Issue
The build workflow was failing with the following errors:
actions/cache: v1is deprecated and causing automatic failuresactions/upload-artifact: v2is deprecated and causing automatic failuresChanges Made
Updated the following actions in
.github/workflows/build.ymlto their latest supported versions:v1→v4(2 instances)v2→v4(line 170)v2→v4(line 201)Validation
These updates ensure the CI/CD pipeline continues to work without interruption and follows GitHub's current best practices for action usage.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.