forked from scottsauber/github-actions-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Ci #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
erisjak
wants to merge
11
commits into
main
Choose a base branch
from
ci
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Ci #5
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e9fd2f5
add a new line to weather forecast
erisjak 54a2e25
neues feature
erisjak 5b5cb7b
add dotnet test to pr verify
erisjak b6cd175
add failing test
erisjak 9d5396e
fix test
erisjak 5d8353a
add dotnet format to pr verify
erisjak c9d3ebd
changed .NET version to 9
erisjak 5b4af6f
switch back to .NET 8
erisjak dab650e
fixed formatting
erisjak 8336c9b
test code ql
erisjak ba93324
add ci
erisjak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| build: | ||
| name: CI | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up .NET Core | ||
| uses: actions/setup-dotnet@v4 | ||
| with: | ||
| dotnet-version: 8.0 | ||
|
|
||
| - name: Build with dotnet | ||
| run: dotnet build --configuration Release | ||
|
|
||
| - name: dotnet publish | ||
| run: dotnet publish src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj --configuration Release -o artifacts | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,3 +10,5 @@ public record WeatherForecast | |
|
|
||
| public string? Summary { get; init; } | ||
| } | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 5 months ago
The best way to fix this issue is to add a
permissions:block at the appropriate level to limit the default permissions of the workflow. In this case, since the workflow is a typical CI job that checks out code and builds it—without performing writing operations to the repository or interacting with pull requests—the minimal necessary permission iscontents: read. This can be set at the root of the workflow file (immediately after thename:and beforeon:) to apply to all jobs unless any require a different set. No other modifications, imports, or additional definitions are needed.Specifically, insert the following at line 2: