Skip to content

Commit 11eb616

Browse files
Fix CI YAML 1.2 schema violation in cache input and optimize build
- Corrected `cache: 'dotnet'` to `cache: true` in `.github/workflows/ci.yml` as `actions/setup-dotnet@v4` expects a boolean for the `cache` input. - Added `--no-restore` to the `dotnet build` command in the `inspect-code` job to avoid redundant restore operations, as `dotnet restore` is explicitly run in the preceding step. Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
1 parent c9db076 commit 11eb616

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/setup-dotnet@v4
2020
with:
2121
dotnet-version: "8.0.x"
22-
cache: 'dotnet'
22+
cache: true
2323

2424
- name: Restore Tools
2525
run: dotnet tool restore
@@ -34,7 +34,7 @@ jobs:
3434
key: inspectcode-${{ hashFiles('.config/dotnet-tools.json', '.github/workflows/ci.yml', 'osu.sln*', 'osu*.slnf', '.editorconfig', '.globalconfig', 'CodeAnalysis/*', '**/*.csproj', '**/*.props') }}
3535

3636
- name: Dotnet code style
37-
run: dotnet build -c Debug -warnaserror osu.Desktop.slnf -p:EnforceCodeStyleInBuild=true
37+
run: dotnet build -c Debug -warnaserror osu.Desktop.slnf -p:EnforceCodeStyleInBuild=true --no-restore
3838

3939
- name: CodeFileSanity
4040
run: |
@@ -79,7 +79,7 @@ jobs:
7979
uses: actions/setup-dotnet@v4
8080
with:
8181
dotnet-version: "8.0.x"
82-
cache: 'dotnet'
82+
cache: true
8383

8484
- name: Compile
8585
run: dotnet build -c Debug -warnaserror osu.Desktop.slnf
@@ -129,7 +129,7 @@ jobs:
129129
uses: actions/setup-dotnet@v4
130130
with:
131131
dotnet-version: "8.0.x"
132-
cache: 'dotnet'
132+
cache: true
133133

134134
- name: Install .NET workloads
135135
run: dotnet workload install android wasi-experimental
@@ -150,7 +150,7 @@ jobs:
150150
uses: actions/setup-dotnet@v4
151151
with:
152152
dotnet-version: "8.0.x"
153-
cache: 'dotnet'
153+
cache: true
154154

155155
- name: Install .NET Workloads
156156
run: dotnet workload install ios

0 commit comments

Comments
 (0)