mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-09 13:06:45 +03:00
Add some basic CICD for testing
This commit is contained in:
59
.github/ci/values-ci.yaml
vendored
Normal file
59
.github/ci/values-ci.yaml
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
image:
|
||||||
|
registry: ghcr.io
|
||||||
|
repository: raylabshq/gitea-mirror
|
||||||
|
tag: ""
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 8080
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
className: "nginx"
|
||||||
|
hosts:
|
||||||
|
- host: ci.example.com
|
||||||
|
|
||||||
|
route:
|
||||||
|
enabled: true
|
||||||
|
forceHTTPS: true
|
||||||
|
domain: ["ci.example.com"]
|
||||||
|
gateway: "dummy-gw"
|
||||||
|
gatewayNamespace: "default"
|
||||||
|
http:
|
||||||
|
gatewaySection: "http"
|
||||||
|
https:
|
||||||
|
gatewaySection: "https"
|
||||||
|
|
||||||
|
gitea-mirror:
|
||||||
|
nodeEnv: production
|
||||||
|
core:
|
||||||
|
databaseUrl: "file:data/gitea-mirror.db"
|
||||||
|
betterAuthSecret: "dummy"
|
||||||
|
betterAuthUrl: "http://localhost:4321"
|
||||||
|
betterAuthTrustedOrigins: "http://localhost:4321"
|
||||||
|
github:
|
||||||
|
username: "ci-user"
|
||||||
|
token: "not-used-in-template"
|
||||||
|
type: "personal"
|
||||||
|
privateRepositories: true
|
||||||
|
skipForks: false
|
||||||
|
skipStarredIssues: false
|
||||||
|
gitea:
|
||||||
|
url: "https://gitea.example.com"
|
||||||
|
token: "not-used-in-template"
|
||||||
|
username: "ci-user"
|
||||||
|
organization: "github-mirrors"
|
||||||
|
visibility: "public"
|
||||||
|
mirror:
|
||||||
|
releases: true
|
||||||
|
wiki: true
|
||||||
|
metadata: true
|
||||||
|
issues: true
|
||||||
|
pullRequests: true
|
||||||
|
starred: false
|
||||||
|
automation:
|
||||||
|
schedule_enabled: true
|
||||||
|
schedule_interval: "3600"
|
||||||
|
cleanup:
|
||||||
|
enabled: true
|
||||||
|
interval: "2592000"
|
||||||
50
.github/workflows/helm-test.yml
vendored
Normal file
50
.github/workflows/helm-test.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
name: Helm Chart CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
yamllint:
|
||||||
|
name: Lint YAML
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
- name: Install yamllint
|
||||||
|
run: pip install --disable-pip-version-check yamllint
|
||||||
|
- name: Run yamllint
|
||||||
|
run: |
|
||||||
|
yamllint -c helm/gitea-mirror/.yamllint helm/gitea-mirror
|
||||||
|
|
||||||
|
helm-template:
|
||||||
|
name: Helm lint & template
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Helm
|
||||||
|
uses: azure/setup-helm@v4
|
||||||
|
with:
|
||||||
|
version: v3.19.0
|
||||||
|
- name: Helm lint
|
||||||
|
run: |
|
||||||
|
helm lint ./helm/gitea-mirror
|
||||||
|
- name: Template with defaults
|
||||||
|
run: |
|
||||||
|
helm template test ./helm/gitea-mirror > /tmp/render-defaults.yaml
|
||||||
|
test -s /tmp/render-defaults.yaml
|
||||||
|
- name: Template with CI values
|
||||||
|
run: |
|
||||||
|
helm template test ./helm/gitea-mirror -f .github/ci/values-ci.yaml > /tmp/render-ci.yaml
|
||||||
|
test -s /tmp/render-ci.yaml
|
||||||
|
- name: Show a summary
|
||||||
|
run: |
|
||||||
|
echo "Rendered with defaults:"
|
||||||
|
awk 'NR<=50{print} NR==51{print "..."; exit}' /tmp/render-defaults.yaml
|
||||||
|
echo ""
|
||||||
|
echo "Rendered with CI values:"
|
||||||
|
awk 'NR<=50{print} NR==51{print "..."; exit}' /tmp/render-ci.yaml
|
||||||
Reference in New Issue
Block a user