|
82 | 82 | output: "trivy-results.sarif"
|
83 | 83 | ignore-unfixed: true
|
84 | 84 | severity: "CRITICAL,HIGH"
|
85 |
| - security-checks: "vuln,secret,config" |
| 85 | + scanners: "vuln,secret,config" |
86 | 86 |
|
87 | 87 | - name: Upload Trivy scan results to GitHub Security tab
|
88 | 88 | uses: github/codeql-action/upload-sarif@v2
|
@@ -164,26 +164,88 @@ jobs:
|
164 | 164 | reporters: '["cli"]'
|
165 | 165 | folder: '["general"]'
|
166 | 166 |
|
| 167 | + - name: Conventional Changelog Update |
| 168 | + uses: TriPSs/conventional-changelog-action@v3 |
| 169 | + id: changelog |
| 170 | + continue-on-error: true |
| 171 | + with: |
| 172 | + github-token: ${{ github.token }} |
| 173 | + output-file: 'CHANGELOG.md' |
| 174 | + skip-version-file: 'true' |
| 175 | + skip-commit: 'true' |
| 176 | + git-push: 'true' |
| 177 | + |
| 178 | + - name: Create Release |
| 179 | + uses: softprops/action-gh-release@v1 |
| 180 | + if: ${{ steps.changelog.outputs.tag != '' }} |
| 181 | + env: |
| 182 | + GITHUB_TOKEN: ${{ github.token }} |
| 183 | + with: |
| 184 | + token: ${{ github.token }} |
| 185 | + tag_name: ${{ steps.changelog.outputs.tag }} |
| 186 | + name: ${{ steps.changelog.outputs.tag }} |
| 187 | + body: ${{ steps.changelog.outputs.clean_changelog }} |
| 188 | + |
| 189 | + - name: Exporting version |
| 190 | + run: echo "version=${{ steps.changelog.outputs.tag }}" >> $GITHUB_OUTPUT |
| 191 | + |
167 | 192 | image-promotions:
|
168 | 193 | name: Promote images to PROD
|
169 | 194 | needs:
|
170 | 195 | - deploy-test
|
171 | 196 | runs-on: ubuntu-22.04
|
| 197 | + permissions: |
| 198 | + contents: write |
| 199 | + discussions: write |
172 | 200 | strategy:
|
173 | 201 | matrix:
|
174 | 202 | component: [ api, init ]
|
175 | 203 | steps:
|
| 204 | + - name: Checkout |
| 205 | + uses: actions/checkout@v3 |
| 206 | + |
| 207 | + - name: Conventional Changelog Update |
| 208 | + uses: TriPSs/conventional-changelog-action@v3 |
| 209 | + id: changelog |
| 210 | + continue-on-error: true |
| 211 | + with: |
| 212 | + github-token: ${{ github.token }} |
| 213 | + output-file: 'CHANGELOG.md' |
| 214 | + skip-version-file: 'true' |
| 215 | + skip-commit: 'true' |
| 216 | + git-push: 'true' |
| 217 | + |
| 218 | + - name: Create Release |
| 219 | + uses: softprops/action-gh-release@v1 |
| 220 | + if: ${{ steps.changelog.outputs.tag != '' }} |
| 221 | + env: |
| 222 | + GITHUB_TOKEN: ${{ github.token }} |
| 223 | + with: |
| 224 | + token: ${{ github.token }} |
| 225 | + tag_name: ${{ steps.changelog.outputs.tag }} |
| 226 | + name: ${{ steps.changelog.outputs.tag }} |
| 227 | + body: ${{ steps.changelog.outputs.clean_changelog }} |
| 228 | + |
176 | 229 | - uses: shrink/actions-docker-registry-tag@v3
|
177 | 230 | with:
|
178 | 231 | registry: ghcr.io
|
179 | 232 | repository: ${{ github.repository }}/${{ matrix.component }}
|
180 | 233 | target: test
|
181 | 234 | tags: prod
|
182 | 235 |
|
| 236 | + - uses: shrink/actions-docker-registry-tag@v3 |
| 237 | + if: ${{ steps.deploy-test.outputs.version != '' }} |
| 238 | + with: |
| 239 | + registry: ghcr.io |
| 240 | + repository: ${{ github.repository }}/${{ matrix.component }} |
| 241 | + target: test |
| 242 | + tags: ${{ steps.deploy-test.outputs.version }} |
| 243 | + |
183 | 244 | deploy-prod:
|
184 | 245 | name: PROD Deployment
|
185 | 246 | needs:
|
186 | 247 | - deploy-test
|
| 248 | + - image-promotions |
187 | 249 | runs-on: ubuntu-22.04
|
188 | 250 | environment:
|
189 | 251 | name: prod
|
|
0 commit comments