Skip to content

Commit 98d8549

Browse files
committed
chore(ci): update GitHub Actions workflow for Helm chart documentation generation
1 parent 74e96d2 commit 98d8549

2 files changed

Lines changed: 20 additions & 21 deletions

File tree

.github/workflows/qa.yml

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ jobs:
5959
SLACK_BOT_TOKEN: op://platform/slack-bot/SLACK_BOT_TOKEN
6060
SLACK_CHANNEL_ID: op://platform/slack-bot/SLACK_CHANNEL_ID
6161
PAT_TOKEN: op://platform/github-commit-pat/credential
62+
HARBOR_USER: op://platform/harbor/username
63+
HARBOR_PASS: op://platform/harbor/password
6264

6365
# Label QA as running and notify Slack (only for non-draft PRs)
6466
- name: Label QA as running
@@ -270,31 +272,26 @@ jobs:
270272
${{ steps.secret-scan.outcome == 'success' && 'success' || 'failure'
271273
}}
272274

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
275276
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 }}
281284

282-
- name: Fetch gh-pages reference for chart releaser
285+
- name: Package chart
283286
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
290291
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
298295

299296
# Check PR review status (PR and PR review events only)
300297
- name: Check PR review status

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
"check:fix": "ultracite fix",
2626
"test": "bun test",
2727
"helm": "helm upgrade --install network ./charts/network -n network --create-namespace --timeout 15m",
28+
"package:pack": "helm package charts/network --destination .",
29+
"package:push:harbor": "helm push ./network-*.tgz oci://ghcr.io/settlemint/network-bootstrapper",
2830
"docs:helm": "helm-docs --chart-search-root=. --skip-version-footer",
2931
"docs:cli": "cat README.tpl > README.md && printf '\\n```\\n' >> README.md && bun src/index.ts --help >> README.md && printf '\\n\\n' >> README.md && bun src/index.ts generate --help >> README.md && printf '\\n```\\n' >> README.md"
3032
},

0 commit comments

Comments
 (0)