|
18 | 18 | - Debug |
19 | 19 | - Release |
20 | 20 |
|
| 21 | +permissions: |
| 22 | + contents: read |
| 23 | + |
21 | 24 | jobs: |
22 | 25 | build: |
23 | 26 | name: 🛠️ Build |
@@ -108,93 +111,40 @@ jobs: |
108 | 111 | buildSwitches: -p:SkipSignAssembly=true |
109 | 112 |
|
110 | 113 | sonarcloud: |
111 | | - name: 🔬 Code Quality Analysis |
| 114 | + name: call-sonarcloud |
112 | 115 | needs: [build,test] |
113 | | - runs-on: ubuntu-22.04 |
114 | | - steps: |
115 | | - - name: Checkout |
116 | | - uses: codebeltnet/git-checkout@v1 |
117 | | - |
118 | | - - name: Install .NET |
119 | | - uses: codebeltnet/install-dotnet@v1 |
120 | | - with: |
121 | | - includePreview: true |
122 | | - |
123 | | - - name: Install .NET Tool - Sonar Scanner |
124 | | - uses: codebeltnet/dotnet-tool-install-sonarscanner@v1 |
125 | | - |
126 | | - - name: Restore Dependencies |
127 | | - uses: codebeltnet/dotnet-restore@v2 |
128 | | - |
129 | | - - name: Run SonarCloud Analysis |
130 | | - uses: codebeltnet/sonarcloud-scan@v1 |
131 | | - with: |
132 | | - token: ${{ secrets.SONAR_TOKEN }} |
133 | | - organization: geekle |
134 | | - projectKey: sharedkernel |
135 | | - version: ${{ needs.build.outputs.version }} |
136 | | - |
137 | | - - name: Build |
138 | | - uses: codebeltnet/dotnet-build@v2 |
139 | | - with: |
140 | | - buildSwitches: -p:SkipSignAssembly=true |
141 | | - uploadBuildArtifact: false |
142 | | - |
143 | | - - name: Finalize SonarCloud Analysis |
144 | | - uses: codebeltnet/sonarcloud-scan-finalize@v1 |
145 | | - with: |
146 | | - token: ${{ secrets.SONAR_TOKEN }} |
| 116 | + uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v1 |
| 117 | + with: |
| 118 | + organization: geekle |
| 119 | + projectKey: sharedkernel |
| 120 | + version: ${{ needs.build.outputs.version }} |
| 121 | + secrets: inherit |
147 | 122 |
|
148 | 123 | codecov: |
149 | | - name: 📊 Code Coverage Analysis |
| 124 | + name: call-codecov |
150 | 125 | needs: [build,test] |
151 | | - runs-on: ubuntu-22.04 |
152 | | - steps: |
153 | | - - name: Checkout |
154 | | - uses: codebeltnet/git-checkout@v1 |
155 | | - |
156 | | - - name: Run CodeCov Analysis |
157 | | - uses: codebeltnet/codecov-scan@v1 |
158 | | - with: |
159 | | - token: ${{ secrets.CODECOV_TOKEN }} |
160 | | - repository: codebeltnet/shared-kernel |
| 126 | + uses: codebeltnet/jobs-codecov/.github/workflows/default.yml@v1 |
| 127 | + with: |
| 128 | + repository: codebeltnet/shared-kernel |
| 129 | + secrets: inherit |
161 | 130 |
|
162 | 131 | codeql: |
163 | | - name: 🛡️ Security Analysis |
| 132 | + name: call-codeql |
164 | 133 | needs: [build,test] |
165 | | - runs-on: ubuntu-22.04 |
166 | | - steps: |
167 | | - - name: Checkout |
168 | | - uses: codebeltnet/git-checkout@v1 |
169 | | - |
170 | | - - name: Install .NET |
171 | | - uses: codebeltnet/install-dotnet@v1 |
172 | | - with: |
173 | | - includePreview: true |
174 | | - |
175 | | - - name: Restore Dependencies |
176 | | - uses: codebeltnet/dotnet-restore@v2 |
177 | | - |
178 | | - - name: Prepare CodeQL SAST Analysis |
179 | | - uses: codebeltnet/codeql-scan@v1 |
180 | | - |
181 | | - - name: Build |
182 | | - uses: codebeltnet/dotnet-build@v2 |
183 | | - with: |
184 | | - buildSwitches: -p:SkipSignAssembly=true |
185 | | - uploadBuildArtifact: false |
186 | | - |
187 | | - - name: Finalize CodeQL SAST Analysis |
188 | | - uses: codebeltnet/codeql-scan-finalize@v1 |
| 134 | + uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v1 |
| 135 | + permissions: |
| 136 | + security-events: write |
189 | 137 |
|
190 | 138 | deploy: |
191 | 139 | if: github.event_name != 'pull_request' |
192 | | - name: 🚀 Deploy v${{ needs.build.outputs.version }} |
193 | | - runs-on: ubuntu-22.04 |
| 140 | + name: call-nuget |
194 | 141 | needs: [build,pack,test,sonarcloud,codecov,codeql] |
195 | | - environment: Production |
196 | | - steps: |
197 | | - - uses: codebeltnet/nuget-push@v1 |
198 | | - with: |
199 | | - token: ${{ secrets.NUGET_TOKEN }} |
200 | | - configuration: ${{ inputs.configuration == '' && 'Release' || inputs.configuration }} |
| 142 | + uses: codebeltnet/jobs-nuget/.github/workflows/default.yml@v1 |
| 143 | + with: |
| 144 | + version: ${{ needs.build.outputs.version }} |
| 145 | + environment: Production |
| 146 | + configuration: ${{ inputs.configuration == '' && 'Release' || inputs.configuration }} |
| 147 | + permissions: |
| 148 | + contents: write |
| 149 | + packages: write |
| 150 | + secrets: inherit |
0 commit comments