File tree Expand file tree Collapse file tree 5 files changed +50
-40
lines changed Expand file tree Collapse file tree 5 files changed +50
-40
lines changed Original file line number Diff line number Diff line change 1+ name : dotnet-demo-api CI
2+
3+ on :
4+ pull_request :
5+ push :
6+
7+ jobs :
8+ test :
9+ uses : vojtechmares/dotnet-demo-api/.github/workflows/reusable-test.yml@main
10+
11+ docker-build :
12+ needs : [test]
13+ uses : vojtechmares/dotnet-demo-api/.github/workflows/reusable-docker-build.yml@main
14+
15+ deploy :
16+ needs : [docker-build]
17+ if : ${{ contains(github.ref, 'release') }}
18+ uses : vojtechmares/dotnet-demo-api/.github/workflows/reusable-deploy.yml@main
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Reusable deploy
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ environment :
7+ required : true
8+ type : string
9+
10+ jobs :
11+ deploy :
12+ runs-on : ubuntu-latest
13+ environment : ${{ inputs.environment }}
14+
15+ steps :
16+ - name : Deploy
17+ run : |
18+ echo "Deploying to ${{ inputs.environment }}..."
19+ sleep 30
20+ echo "Deploy to ${{ inputs.environment }} complete."
Original file line number Diff line number Diff line change 1- name : Docker build
1+ name : Reusable Docker build
22
33on :
4- push :
5- branches :
6- - main
7- pull_request :
8- branches :
9- - main
4+ workflow_call :
105
116jobs :
127 build :
13- runs-on : ubuntu-24.04
8+ runs-on : ubuntu-latest
149
1510 permissions :
1611 contents : read
5146 platforms : linux/amd64
5247 push : true
5348 tags : ${{ steps.meta.outputs.tags }}
54- labels : ${{ steps.meta.outputs.labels }}
49+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1- name : .NET Test
1+ name : Reusable .NET tests
22
33on :
4- push :
5- branches :
6- - main
7- pull_request :
8- branches :
9- - main
4+ workflow_call :
5+ inputs :
6+ dotnet-version :
7+ required : true
8+ type : string
109
1110jobs :
1211 test :
13- runs-on : ubuntu-24.04 # or ubuntu- latest
12+ runs-on : ubuntu-latest
1413
1514 steps :
1615 - name : Checkout code
1918 - name : Setup .NET
2019 uses : actions/setup-dotnet@v4
2120 with :
22- dotnet-version : ' 9.0.x '
21+ dotnet-version : ${{ inputs.dotnet-version }}
2322
2423 - name : Cache NuGet packages
2524 uses : actions/cache@v4
You can’t perform that action at this time.
0 commit comments