mirror of
https://github.com/h44z/wg-portal.git
synced 2025-04-19 08:55:12 +00:00
* Added TLS support for web - Added optional configurations `cert_file` and `key_file` to run web server with https Signed-off-by: Dmytro Bondar <git@bonddim.com> * Helm chart update - Refactored Ingress to use one host only (`config.web.external_url` is required) - Added Certificate resource template (secret is mounted to container into `/app/certs/`) - Added support for service with mixed protocols (exposes UI and Wireguard ports on same IP) - Added helm-docs target to makefile - Changed pod labels to use selectorLabels - Removed default probes (app runs without healthy web) - Removed sections from README Signed-off-by: Dmytro Bondar <git@bonddim.com> * Fix chart workflow path filter * Fix chart lint issue * Skip clean-up tested chart * Try k3d cluster --------- Signed-off-by: Dmytro Bondar <git@bonddim.com>
87 lines
2.3 KiB
YAML
87 lines
2.3 KiB
YAML
# Publish chart to the GitHub Container Registry (GHCR) on push to master
|
|
# Run the following tests on PRs:
|
|
# - Check if chart's documentation is up to date
|
|
# - Check chart linting
|
|
# - Check chart installation in a Kind cluster
|
|
# - Check chart packaging
|
|
|
|
name: Chart
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [master]
|
|
paths: ['deploy/helm/**']
|
|
push:
|
|
branches: [master]
|
|
paths: ['deploy/helm/**']
|
|
|
|
jobs:
|
|
lint-test:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Check docs
|
|
run: |
|
|
make helm-docs
|
|
if ! git diff --exit-code; then
|
|
echo "error::Documentation is not up to date. Please run helm-docs and commit changes."
|
|
exit 1
|
|
fi
|
|
|
|
# ct lint requires Python 3.x to run following packages:
|
|
# - yamale (https://github.com/23andMe/Yamale)
|
|
# - yamllint (https://github.com/adrienverge/yamllint)
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- uses: helm/chart-testing-action@v2
|
|
|
|
- name: Run chart-testing (lint)
|
|
run: ct lint --config ct.yaml
|
|
|
|
- uses: nolar/setup-k3d-k3s@v1
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run chart-testing (install)
|
|
run: ct install --config ct.yaml
|
|
|
|
- name: Run helm package charts
|
|
run: |
|
|
for chart in $(ct list-changed --config ct.yaml); do
|
|
helm package $chart -d out
|
|
done
|
|
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event_name == 'push' }}
|
|
permissions:
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: helm/chart-testing-action@v2
|
|
- name: Run helm package charts
|
|
run: |
|
|
for chart in $(ct list-changed --config ct.yaml); do
|
|
helm package $chart -d out
|
|
done
|
|
|
|
- name: Push chart to GHCR
|
|
working-directory: out
|
|
run: |
|
|
for pkg in $(ls *.tgz); do
|
|
helm push $pkg oci://ghcr.io/${{ github.repository_owner }}/charts
|
|
done
|