Skip to content
Merged
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 30 additions & 48 deletions .github/workflows/pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,46 +23,17 @@ permissions:

jobs:
prepare_linux:
name: 🐧 Prepare Linux
runs-on: ubuntu-24.04
timeout-minutes: 15
outputs:
restoreCacheKey: ${{ steps.dotnet-restore.outputs.restoreCacheKey }}
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1

- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true

- id: dotnet-restore
name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2
with:
useRestoreCache: true
name: call-restore-linux
uses: codebeltnet/jobs-dotnet-restore/.github/workflows/default.yml@v1
with:
use-restore-cache: true

prepare_windows:
name: 🪟 Prepare Windows
runs-on: windows-2022
timeout-minutes: 15
outputs:
restoreCacheKey: ${{ steps.dotnet-restore.outputs.restoreCacheKey }}
steps:
- name: Checkout
uses: codebeltnet/git-checkout@v1

- name: Install .NET
uses: codebeltnet/install-dotnet@v1
with:
includePreview: true

- id: dotnet-restore
name: Restore Dependencies
uses: codebeltnet/dotnet-restore@v2
with:
useRestoreCache: true
name: call-restore-windows
uses: codebeltnet/jobs-dotnet-restore/.github/workflows/default.yml@v1
with:
use-restore-cache: true
runs-on: windows-2022

prepare_test:
name: 📜 Prepare Test
Expand Down Expand Up @@ -91,10 +62,10 @@ jobs:
strategy:
matrix:
configuration: [Debug, Release]
uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v1
uses: codebeltnet/jobs-dotnet-build/.github/workflows/default.yml@v2
with:
configuration: ${{ matrix.configuration }}
restore-cache-key: ${{ needs.prepare_linux.outputs.restoreCacheKey }}
restore-cache-key: ${{ needs.prepare_linux.outputs.restore-cache-key }}
strong-name-key-filename: cuemon.snk
secrets:
GCP_TOKEN: ${{ secrets.GCP_TOKEN }}
Expand All @@ -106,12 +77,11 @@ jobs:
strategy:
matrix:
configuration: [Debug, Release]
uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v1
uses: codebeltnet/jobs-dotnet-pack/.github/workflows/default.yml@v2
with:
configuration: ${{ matrix.configuration }}
upload-packed-artifact: true
version: ${{ needs.build.outputs.version }}
restore-cache-key: ${{ needs.prepare_linux.outputs.restoreCacheKey }}
restore-cache-key: ${{ needs.prepare_linux.outputs.restore-cache-key }}

test:
name: call-test
Expand All @@ -122,12 +92,12 @@ jobs:
os: [ubuntu-24.04, windows-2022]
configuration: [Debug, Release]
project: ${{ fromJson(needs.prepare_test.outputs.json) }}
uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v1
uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v2
with:
runs-on: ${{ matrix.os }}
configuration: ${{ matrix.configuration }}
projects: ${{ matrix.project }}
restore-cache-key: ${{ matrix.os == 'ubuntu-24.04' && needs.prepare_linux.outputs.restoreCacheKey || needs.prepare_windows.outputs.restoreCacheKey }}
restore-cache-key: ${{ matrix.os == 'ubuntu-24.04' && needs.prepare_linux.outputs.restore-cache-key || needs.prepare_windows.outputs.restore-cache-key }}
test-arguments: -- RunConfiguration.DisableAppDomain=true

integration_test:
Expand Down Expand Up @@ -158,12 +128,24 @@ jobs:
env:
SA_PASSWORD: ${{ secrets.SA_PASSWORD }}

- name: Restore Cache
uses: actions/cache/restore@v4
with:
path: |
${{ github.workspace }}
!${{ github.workspace }}/.git
~/.nuget/packages
key: ${{ needs.prepare_linux.outputs.restoreCacheKey }}
restore-keys: |
dotnet-restore-
enableCrossOsArchive: true
fail-on-cache-miss: true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix cache restore step in integration_test
There are two issues here that will block cache restoration:

  1. The official action is actions/cache@v4, not actions/cache/restore@v4.
  2. The output name should use kebab-case (restore-cache-key), not CamelCase (restoreCacheKey).

Apply this diff:

-      - name: Restore Cache
-        uses: actions/cache/restore@v4
+      - name: Restore Cache
+        uses: actions/cache@v4
         with:
           path: |
             ${{ github.workspace }}
             !${{ github.workspace }}/.git
             ~/.nuget/packages
-          key: ${{ needs.prepare_linux.outputs.restoreCacheKey }}
+          key: ${{ needs.prepare_linux.outputs.restore-cache-key }}
           restore-keys: |
             dotnet-restore-
           enableCrossOsArchive: true
           fail-on-cache-miss: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Restore Cache
uses: actions/cache/restore@v4
with:
path: |
${{ github.workspace }}
!${{ github.workspace }}/.git
~/.nuget/packages
key: ${{ needs.prepare_linux.outputs.restoreCacheKey }}
restore-keys: |
dotnet-restore-
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Restore Cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}
!${{ github.workspace }}/.git
~/.nuget/packages
key: ${{ needs.prepare_linux.outputs.restore-cache-key }}
restore-keys: |
dotnet-restore-
enableCrossOsArchive: true
fail-on-cache-miss: true
🤖 Prompt for AI Agents
In .github/workflows/pipelines.yml around lines 131 to 142, the cache restore
step uses an incorrect action name and output variable casing. Change the action
from 'actions/cache/restore@v4' to the correct 'actions/cache@v4'. Also, update
the output variable from 'restoreCacheKey' to 'restore-cache-key' to match
kebab-case naming conventions. These changes will fix the cache restoration
process.


- name: Test with ${{ matrix.configuration }} build
uses: codebeltnet/dotnet-test@v3
uses: codebeltnet/dotnet-test@v4
with:
projects: ${{ matrix.project }}
configuration: ${{ matrix.configuration }}
restoreCacheKey: ${{ needs.prepare_linux.outputs.restoreCacheKey }}
env:
CONNECTIONSTRINGS__ADVENTUREWORKS: ${{ secrets.DB_ADVENTUREWORKS }}

Expand Down Expand Up @@ -202,7 +184,7 @@ jobs:
deploy:
if: github.event_name != 'pull_request'
name: call-nuget
needs: [build,pack,test,sonarcloud,codecov,codeql]
needs: [build, pack, test, integration_test, sonarcloud, codecov, codeql]
uses: codebeltnet/jobs-nuget-push/.github/workflows/default.yml@v1
with:
version: ${{ needs.build.outputs.version }}
Expand Down
Loading