github - Github 操作将子模块排除在 .net 构建/测试之外
问题描述
我正在使用另一个 Git Repo 作为库,它使用不同的.net
版本并且缺少在操作上构建的权限。我如何从构建中排除这个/所有子模块?
产生的错误代码:
error MSB3191: Unable to create directory "obj/Debug/". Access to the path '/home/runner/work/Repo/Project/Submodule/Folder/obj/Debug/' is denied.
error MSB3644: The reference assemblies for .NETFramework,Version=v2.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application...
工作流文件 (dotnet.yml)
name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: textbook/git-checkout-submodule-action@master
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
解决方案
推荐阅读
- gnuradio - 无法使“FM_receiver”示例 gnuradio 代码工作
- automata - 如何为特定范围的二进制数绘制 DFA?
- android - MPAndroidChart 正确使用 getPixelForValues 为图表渐变颜色
- csv - 为什么 Google 数据工作室 csv 连接器工作不正常
- macos - 错误“sh: : command not found sh: : command not found”编号 127
- laravel - Is it possible to make the user section of my website a SPA and the admin section MPA in laravel
- docker - 可以在 Gitlab CI/CD 上缓存 docker-compose 吗?
- c++ - How to store a series of SFML sprites
- python - How to identify data type from stdout in nodejs exec method?
- docker - http2: server sent GOAWAY and closed the connection; LastStreamID=73, ErrCode=NO_ERROR, debug="" when pushing docker image to private Artifactory