mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 14:15:24 +00:00
chore: general file cleanup
This commit is contained in:
1 parent
df3c762b3d
commit
77c19345b3
34 files changed
-981
No files matched your search
@@ -1,8 +0,0 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Support Center
|
||||
url: https://github.com/Termix-SSH/Support/issues
|
||||
about: Report any feature requests or bugs in the support center
|
||||
- name: Discord
|
||||
url: https://discord.gg/jVQGdvHDrf
|
||||
about: Official Termix Discord server for general discussion (not recommended for support)
|
||||
@@ -1,83 +0,0 @@
|
||||
name: Crowdin Sync
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 6 * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: "Branch to sync translations into"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
crowdin:
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: Resolve target branch
|
||||
id: branch
|
||||
run: |
|
||||
BRANCH="${{ inputs.branch }}"
|
||||
if [ -z "$BRANCH" ]; then
|
||||
BRANCH="${{ github.event.repository.default_branch }}"
|
||||
fi
|
||||
echo "name=$BRANCH" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ steps.branch.outputs.name }}
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.TERMIX_PAT }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- name: Upload sources to Crowdin
|
||||
uses: crowdin/github-action@v3
|
||||
with:
|
||||
upload_sources: true
|
||||
upload_translations: false
|
||||
download_translations: false
|
||||
create_pull_request: false
|
||||
push_translations: false
|
||||
token: ${{ secrets.CROWDIN_API_KEY }}
|
||||
project_id: "858252"
|
||||
env:
|
||||
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_KEY }}
|
||||
|
||||
- name: Pre-translate untranslated strings
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
|
||||
run: node scripts/crowdin-pretranslate.cjs
|
||||
|
||||
- name: Download translations from Crowdin
|
||||
uses: crowdin/github-action@v3
|
||||
with:
|
||||
upload_sources: false
|
||||
upload_translations: false
|
||||
download_translations: true
|
||||
create_pull_request: false
|
||||
push_translations: false
|
||||
token: ${{ secrets.CROWDIN_API_KEY }}
|
||||
project_id: "858252"
|
||||
env:
|
||||
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_KEY }}
|
||||
|
||||
- name: Commit translations
|
||||
run: |
|
||||
git config user.name "LukeGus"
|
||||
git config user.email "bugattiguy527@gmail.com"
|
||||
|
||||
git add src/ui/locales/translated
|
||||
if git diff --cached --quiet; then
|
||||
echo "No translation changes to commit."
|
||||
exit 0
|
||||
fi
|
||||
git commit -m "chore: sync Crowdin translations"
|
||||
git push origin HEAD:"${{ steps.branch.outputs.name }}"
|
||||
@@ -1,76 +0,0 @@
|
||||
name: Deploy Helm
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
namespace:
|
||||
description: "Kubernetes namespace"
|
||||
required: true
|
||||
default: termix
|
||||
release:
|
||||
description: "Helm release name"
|
||||
required: true
|
||||
default: termix
|
||||
values_file:
|
||||
description: "Values file to use"
|
||||
required: true
|
||||
default: charts/termix/values-gitops-example.yaml
|
||||
image_tag:
|
||||
description: "Image tag to deploy"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||
environment: production
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v5
|
||||
with:
|
||||
version: v3.15.4
|
||||
|
||||
- name: Configure kubeconfig
|
||||
env:
|
||||
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
|
||||
run: |
|
||||
test -n "$KUBE_CONFIG"
|
||||
echo "$KUBE_CONFIG" | base64 -d > "$RUNNER_TEMP/kubeconfig"
|
||||
chmod 600 "$RUNNER_TEMP/kubeconfig"
|
||||
|
||||
- name: Lint chart
|
||||
run: helm lint charts/termix
|
||||
|
||||
- name: Deploy
|
||||
env:
|
||||
KUBECONFIG: ${{ runner.temp }}/kubeconfig
|
||||
IMAGE_TAG: ${{ inputs.image_tag }}
|
||||
RELEASE_NAME: ${{ inputs.release }}
|
||||
TARGET_NAMESPACE: ${{ inputs.namespace }}
|
||||
VALUES_FILE: ${{ inputs.values_file }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
[[ "$RELEASE_NAME" =~ ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ ]]
|
||||
[[ "$TARGET_NAMESPACE" =~ ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ ]]
|
||||
case "$VALUES_FILE" in
|
||||
charts/termix/*.yaml) ;;
|
||||
*) echo "values_file must be a YAML file under charts/termix" >&2; exit 1 ;;
|
||||
esac
|
||||
test -f "$VALUES_FILE"
|
||||
ARGS=()
|
||||
if [ -n "$IMAGE_TAG" ]; then
|
||||
ARGS+=(--set "image.tag=$IMAGE_TAG")
|
||||
fi
|
||||
helm upgrade --install "$RELEASE_NAME" charts/termix \
|
||||
--namespace "$TARGET_NAMESPACE" \
|
||||
--create-namespace \
|
||||
--values "$VALUES_FILE" \
|
||||
--atomic \
|
||||
--timeout 10m \
|
||||
"${ARGS[@]}"
|
||||
@@ -1,73 +0,0 @@
|
||||
name: Helm
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "charts/**"
|
||||
- ".github/workflows/helm.yml"
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "charts/**"
|
||||
- ".github/workflows/helm.yml"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
publish:
|
||||
description: "Publish chart to GHCR OCI registry"
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v5
|
||||
with:
|
||||
version: v3.15.4
|
||||
|
||||
- name: Lint chart
|
||||
run: helm lint charts/termix
|
||||
|
||||
- name: Render default chart
|
||||
run: helm template termix charts/termix --namespace termix
|
||||
|
||||
- name: Render GitOps example
|
||||
run: helm template termix charts/termix --values charts/termix/values-gitops-example.yaml --namespace termix
|
||||
|
||||
- name: Render Traefik example
|
||||
run: helm template termix charts/termix --values charts/termix/values-traefik.yaml --namespace termix
|
||||
|
||||
publish:
|
||||
needs: lint
|
||||
if: github.event_name == 'workflow_dispatch' && inputs.publish
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Helm
|
||||
uses: azure/setup-helm@v5
|
||||
with:
|
||||
version: v3.15.4
|
||||
|
||||
- name: Log in to GHCR
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io --username "${{ github.actor }}" --password-stdin
|
||||
|
||||
- name: Package chart
|
||||
run: helm package charts/termix --destination .helm-packages
|
||||
|
||||
- name: Push chart
|
||||
run: |
|
||||
OWNER="$(echo "$GITHUB_REPOSITORY_OWNER" | tr '[:upper:]' '[:lower:]')"
|
||||
helm push .helm-packages/termix-*.tgz "oci://ghcr.io/$OWNER/charts"
|
||||
@@ -1,32 +0,0 @@
|
||||
name: Generate OpenAPI Specification
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
generate-openapi:
|
||||
name: Generate OpenAPI JSON
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Generate OpenAPI specification
|
||||
run: npm run generate:openapi
|
||||
|
||||
- name: Upload OpenAPI artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: openapi-spec
|
||||
path: openapi.json
|
||||
retention-days: 90
|
||||
@@ -28,8 +28,6 @@ jobs:
|
||||
run: npm run build:sdk
|
||||
|
||||
- name: Lint
|
||||
# npm run lint, not npx eslint — the script also checks that the
|
||||
# generated dialect schemas match schema.ts, which eslint cannot see.
|
||||
run: npm run lint
|
||||
|
||||
- name: Run Prettier check
|
||||
@@ -48,9 +46,6 @@ jobs:
|
||||
name: Postgres and MySQL
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||
|
||||
# The test suite only ever sees SQLite. Everything that differs per engine —
|
||||
# the RETURNING replacements, the read-then-write transactions, the
|
||||
# migrations themselves — is only covered here, against real servers.
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
@@ -97,17 +92,12 @@ jobs:
|
||||
- name: Build plugin SDK
|
||||
run: npm run build:sdk
|
||||
|
||||
# Each run applies the migrations to an empty database first, so a
|
||||
# migration that does not apply cleanly fails the build.
|
||||
- name: Verify Postgres
|
||||
run: npm run verify:dialect -- postgres://termix:termix@127.0.0.1:5432/termix_test
|
||||
|
||||
- name: Verify MySQL
|
||||
run: npm run verify:dialect -- mysql://termix:termix@127.0.0.1:3306/termix_test
|
||||
|
||||
# The same repository suite the SQLite run executes, pointed at each
|
||||
# engine. This is where a dialect difference in a query shows up as a
|
||||
# failing assertion rather than as a bug report.
|
||||
- name: Repository tests on Postgres
|
||||
env:
|
||||
TEST_DIALECT: postgres
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
name: Redirect issues
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
close:
|
||||
if: github.event.issue.author_association != 'OWNER' && github.event.issue.author_association != 'COLLABORATOR'
|
||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/github-script@v9
|
||||
with:
|
||||
script: |
|
||||
const n = context.issue.number;
|
||||
await github.rest.issues.createComment({
|
||||
...context.repo, issue_number: n,
|
||||
body: "Do not create issues here. Use the dedicated support repo and issue template system: https://github.com/Termix-SSH/Support"
|
||||
});
|
||||
await github.rest.issues.update({ ...context.repo, issue_number: n, state: "closed", state_reason: "not_planned" });
|
||||
await github.rest.issues.lock({ ...context.repo, issue_number: n, lock_reason: "off-topic" });
|
||||
Reference in new issue
Block a user