|
59 | 59 | SLACK_BOT_TOKEN: op://platform/slack-bot/SLACK_BOT_TOKEN |
60 | 60 | SLACK_CHANNEL_ID: op://platform/slack-bot/SLACK_CHANNEL_ID |
61 | 61 | PAT_TOKEN: op://platform/github-commit-pat/credential |
| 62 | + HARBOR_USER: op://platform/harbor/username |
| 63 | + HARBOR_PASS: op://platform/harbor/password |
62 | 64 |
|
63 | 65 | # Label QA as running and notify Slack (only for non-draft PRs) |
64 | 66 | - name: Label QA as running |
@@ -270,31 +272,26 @@ jobs: |
270 | 272 | ${{ steps.secret-scan.outcome == 'success' && 'success' || 'failure' |
271 | 273 | }} |
272 | 274 |
|
273 | | - # Publish charts via Helm chart-releaser so gh-pages stays in sync with tagged releases |
274 | | - - name: Configure git author for chart releaser |
| 275 | + - name: Login to Harbor |
275 | 276 | if: | |
276 | | - github.event_name == 'push' && |
277 | | - startsWith(github.ref, 'refs/tags/') |
278 | | - run: | |
279 | | - git config user.name "SettleMint Release Bot" |
280 | | - git config user.email "support@settlemint.com" |
| 277 | + github.event_name == 'push' || |
| 278 | + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) |
| 279 | + uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3 |
| 280 | + with: |
| 281 | + registry: harbor.settlemint.com |
| 282 | + username: ${{ env.HARBOR_USER }} |
| 283 | + password: ${{ env.HARBOR_PASS }} |
281 | 284 |
|
282 | | - - name: Fetch gh-pages reference for chart releaser |
| 285 | + - name: Package chart |
283 | 286 | if: | |
284 | | - github.event_name == 'push' && |
285 | | - startsWith(github.ref, 'refs/tags/') |
286 | | - run: | |
287 | | - git fetch origin gh-pages:refs/remotes/origin/gh-pages |
288 | | -
|
289 | | - - name: Publish Helm charts with chart-releaser |
| 287 | + github.event_name == 'push' || |
| 288 | + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) |
| 289 | + run: bun run package:pack |
| 290 | + - name: Push chart to Harbor |
290 | 291 | if: | |
291 | | - github.event_name == 'push' && |
292 | | - startsWith(github.ref, 'refs/tags/') |
293 | | - uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0 |
294 | | - env: |
295 | | - CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
296 | | - with: |
297 | | - charts_dir: charts |
| 292 | + github.event_name == 'push' || |
| 293 | + (github.event_name == 'pull_request' && github.event.pull_request.draft == false) |
| 294 | + run: bun run package:push:harbor |
298 | 295 |
|
299 | 296 | # Check PR review status (PR and PR review events only) |
300 | 297 | - name: Check PR review status |
|
0 commit comments