mirror of
https://github.com/wahyd4/passkey-auth.git
synced 2026-08-08 20:15:44 +10:00
96 lines
2.4 KiB
YAML
96 lines
2.4 KiB
YAML
name: Release Helm Chart
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'helm/passkey-auth/**'
|
|
release:
|
|
types: [published]
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
lint-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@v4
|
|
with:
|
|
version: '3.14.0'
|
|
|
|
- name: Set up chart-testing
|
|
uses: helm/chart-testing-action@v2.6.1
|
|
|
|
- name: Run chart-testing (list)
|
|
run: ct list --target-branch ${{ github.event.repository.default_branch }} --chart-dirs helm
|
|
|
|
- name: Run chart-testing (lint)
|
|
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --chart-dirs helm
|
|
|
|
- name: Create kind cluster
|
|
uses: helm/kind-action@v1.9.0
|
|
|
|
- name: Run chart-testing (install)
|
|
run: |
|
|
# Install with test values
|
|
ct install --target-branch ${{ github.event.repository.default_branch }} --chart-dirs helm \
|
|
--helm-extra-set-args "--set config.webauthn.rpId=test.local --set config.auth.allowedEmails={test@example.com} --set secrets.sessionSecret=test-secret-for-ci-only --set ingress.enabled=false"
|
|
|
|
release:
|
|
needs: lint-test
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config user.name "$GITHUB_ACTOR"
|
|
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
|
|
|
- name: Install Helm
|
|
uses: azure/setup-helm@v4
|
|
with:
|
|
version: '3.14.0'
|
|
|
|
- name: Add helm repos
|
|
run: |
|
|
helm repo add bitnami https://charts.bitnami.com/bitnami
|
|
|
|
- name: Run chart-releaser
|
|
uses: helm/chart-releaser-action@v1.6.0
|
|
with:
|
|
charts_dir: helm
|
|
config: .github/cr.yaml
|
|
env:
|
|
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v4
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: .cr-release-packages
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|