Skip to content
Open

Cd2 #93

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d91d5f0
add pr verify workflow
erisjak Sep 1, 2025
d0ae0bd
edited workflow yaml
erisjak Sep 1, 2025
010ee28
Formatting (#3)
erisjak Sep 2, 2025
1eb2116
Codeql (#4)
erisjak Sep 2, 2025
5292cdf
Ci upload artifact (#6)
erisjak Sep 2, 2025
a01b75a
Cron (#7)
erisjak Sep 5, 2025
cedb7eb
Fix cron syntax quotes in workflow file
erisjak Sep 5, 2025
6eab5c4
delete cron job
erisjak Sep 8, 2025
d68b512
added ci pipeline
erisjak Sep 8, 2025
80f2477
added ci pipeline (#9)
erisjak Sep 8, 2025
9455da7
modified ci.yml
erisjak Sep 8, 2025
90e8f12
Ci pipeline (#10)
erisjak Sep 8, 2025
21e17ef
add azure login
erisjak Sep 12, 2025
cd5b376
Merge branch 'main' into cd2
erisjak Sep 12, 2025
54d6aa6
Cd2 (#11)
erisjak Sep 12, 2025
590a095
Refactor CI workflow and update .NET setup
erisjak Sep 12, 2025
7bee197
Update ci.yml
erisjak Sep 12, 2025
c362884
Update CI workflow for .NET and artifact paths
erisjak Sep 12, 2025
34dc9be
removed caching path
erisjak Sep 12, 2025
c692202
removed cahce
erisjak Sep 12, 2025
9fb05e9
Update CI workflow for .NET setup and caching
erisjak Sep 12, 2025
5413d78
add oauth permissions
erisjak Sep 12, 2025
dc139d6
fix
erisjak Sep 12, 2025
25ec2b0
Update .NET setup in CI workflow
erisjak Sep 15, 2025
8c2f5bc
Add empty line for better readability in CI config
erisjak Sep 15, 2025
db12309
Merge branch 'main' into cd2
erisjak Sep 15, 2025
0b8052d
Cd2 (#12)
erisjak Sep 15, 2025
43f7f2d
Change cache setting for .NET setup to boolean
erisjak Sep 15, 2025
6a2c0da
Remove dependency restoration step from CI
erisjak Sep 15, 2025
e962d7d
Add NuGet packages lock files
erisjak Sep 16, 2025
89c652e
added locked mode
erisjak Sep 16, 2025
1a74524
Merge branch 'cd2' of https://github.com/erisjak/github-actions-dotne…
erisjak Sep 16, 2025
cd5cb9e
Update .NET setup caching configuration
erisjak Sep 16, 2025
51d0815
Merge branch 'main' into cd2
erisjak Sep 16, 2025
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
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches:
- main

permissions:
id-token: write
contents: read

jobs:
build:
name: CI
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
cache: true
cache-dependency-path: |
**/packages.lock.json
**/global.json
**/nuget.config

- name: Restore (locked)
run: dotnet restore --locked-mode

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --configuration Release --no-build --nologo

- name: Publish application
run: dotnet publish src/GitHubActionsDotNet.Api/GitHubActionsDotNet.Api.csproj --configuration Release --no-build -o artifacts

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dometrain-artifact
path: artifacts/

deploy_dev:
name: Deploy Dev
runs-on: ubuntu-latest
needs: build

steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dometrain-artifact
path: artifacts/

- name: Azure login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: app-dometrain-github-actions-erisjakupi-dev
package: artifacts
27 changes: 27 additions & 0 deletions .github/workflows/pr-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR Verify

on:
pull_request:
branches: [ "main" ]

jobs:
build:
name: PR Verify
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 test
run: dotnet test --configuration Release --no-build

- name: dotnet format
run: dotnet format -v detailed --verify-no-changes
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ public void TemperatureFShouldReturnCorrectValueBasedOnTemperatureC()
};

weatherForecast.TemperatureF.Should().Be(32);
weatherForecast.TemperatureF.Should().Be(32);
}
}
Loading