Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Kubernetes YAML Validation

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
validate-yaml:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install kubeval
run: |
wget https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz
tar xf kubeval-linux-amd64.tar.gz
sudo mv kubeval /usr/local/bin

- name: Validate Kubernetes YAML files
run: |
find . -name '*.yaml' -o -name '*.yml' | while read file; do
echo "Validating $file"
kubeval "$file" || true
done

yaml-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: YAML Lint
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: .
config_file: .yamllint
strict: false

security-scan:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'config'
scan-ref: '.'
format: 'table'
exit-code: '0'
severity: 'CRITICAL,HIGH'
48 changes: 48 additions & 0 deletions .github/workflows/sync-upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Sync Fork with Upstream

on:
schedule:
- cron: '0 */6 * * *' # Every 6 hours
workflow_dispatch: # Manual trigger

jobs:
sync:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Add upstream remote
run: |
git remote add upstream https://github.com/Zhoneym/DifyAI-Kubernetes.git || true
git fetch upstream

- name: Merge upstream changes
run: |
git checkout main
git merge upstream/main --no-edit || echo "No changes to merge"

- name: Push changes
run: git push origin main
continue-on-error: true

- name: Create Pull Request if conflicts
if: failure()
uses: peter-evans/create-pull-request@v5
with:
commit-message: Sync fork with upstream
title: '馃攧 Sync with upstream repository'
body: |
This PR syncs the fork with the upstream repository.
Please review and resolve any conflicts.
branch: sync-upstream
delete-branch: true
17 changes: 17 additions & 0 deletions helm-chart/difyai/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: difyai
description: Helm chart for DifyAI platform on Kubernetes
type: application
version: 0.1.0
appVersion: "1.7.0"

maintainers:
- name: FreeAiHub
url: https://github.com/FreeAiHub

keywords:
- dify
- ai
- kubernetes
- llm
- chatbot