Skip to content

Commit 43c644b

Browse files
authored
chore(ci): publish helm charts to gh-pages on tags (#23)
## Summary - replace Harbor registry push with helm-gh-pages publishing - restrict chart publishing to tagged pushes - remove the unused Helm packaging script ## Testing - bun check - bun test - bun typecheck ## Summary by Sourcery Switch Helm chart publishing in the CI workflow from Harbor to GitHub Pages on tagged releases and remove associated packaging scripts. CI: - Remove Harbor login and chart push steps from the QA workflow - Add helm-gh-pages action to publish charts on push events to Git tags - Limit chart publishing step to tag references only Chores: - Remove unused Helm packaging and Harbor push scripts from package.json - Clean up Harbor credentials from CI environment variables
1 parent 47a731b commit 43c644b

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

.github/workflows/qa.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ jobs:
5858
env:
5959
SLACK_BOT_TOKEN: op://platform/slack-bot/SLACK_BOT_TOKEN
6060
SLACK_CHANNEL_ID: op://platform/slack-bot/SLACK_CHANNEL_ID
61-
HARBOR_USER: op://platform/harbor/username
62-
HARBOR_PASS: op://platform/harbor/password
6361
PAT_TOKEN: op://platform/github-commit-pat/credential
6462

6563
# Label QA as running and notify Slack (only for non-draft PRs)
@@ -272,27 +270,14 @@ jobs:
272270
${{ steps.secret-scan.outcome == 'success' && 'success' || 'failure'
273271
}}
274272

275-
- name: Login to Harbor
273+
- name: Publish Helm charts to GitHub Pages
276274
if: |
277-
github.event_name == 'push' ||
278-
(github.event_name == 'pull_request' && github.event.pull_request.draft == false)
279-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3
275+
github.event_name == 'push' &&
276+
startsWith(github.ref, 'refs/tags/')
277+
uses: stefanprodan/helm-gh-pages@v1.7.0
280278
with:
281-
registry: harbor.settlemint.com
282-
username: ${{ env.HARBOR_USER }}
283-
password: ${{ env.HARBOR_PASS }}
284-
285-
- name: Package chart
286-
if: |
287-
github.event_name == 'push' ||
288-
(github.event_name == 'pull_request' && github.event.pull_request.draft == false)
289-
run: bun run package:pack
290-
291-
- name: Push chart to Harbor
292-
if: |
293-
github.event_name == 'push' ||
294-
(github.event_name == 'pull_request' && github.event.pull_request.draft == false)
295-
run: bun run package:push:harbor
279+
token: ${{ secrets.GITHUB_TOKEN }}
280+
charts_dir: charts
296281

297282
# Check PR review status (PR and PR review events only)
298283
- name: Check PR review status

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
"test": "bun test",
2727
"helm": "helm upgrade --install network ./charts/network -n network --create-namespace --timeout 15m",
2828
"docs:helm": "helm-docs --chart-search-root=. --skip-version-footer",
29-
"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",
30-
"package:pack": "helm package charts/network --destination .",
31-
"package:push:harbor": "helm push ./network-*.tgz oci://harbor.settlemint.com/atk"
29+
"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"
3230
},
3331
"devDependencies": {
3432
"@biomejs/biome": "2.2.4",

0 commit comments

Comments
 (0)