- sources: new `kind` (auto|plain|base64) — fetcher honors it (plain = no base64 decode; base64 = force decode; auto = try base64 then plain). Schema ALTER for existing DBs, API validation, Settings UI selector (add-form + inline). - CI: rewrite images job to the proven pattern (buildx + metadata-action + build-push-action) using a write:package PAT secret (REGISTRY_TOKEN); the automatic GITEA_TOKEN cannot push packages. Matrix over checker/api/web. - compose: docker-compose.yml now pulls git.qomar.pw/omar/zhguchiy_perchik/* images from the Gitea registry; docker-compose.build.yml is the local-build override. Verified on a real run: 3 aggregated lists → 7838 raw → 4842 unique (canonical dedup) → 194 working proxies across all four protocols, served through the panel and subscriptions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014TtR4PP2JM9KadaBkhPGAE
87 lines
2.5 KiB
YAML
87 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ["v*"]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: git.qomar.pw
|
|
# git.qomar.pw/omar/zhguchiy_perchik — images are namespaced under the repo.
|
|
IMAGE_BASE: git.qomar.pw/${{ github.repository }}
|
|
|
|
jobs:
|
|
# Fast validation on every push/PR: Go vet + tests + build, and the frontend
|
|
# build (which runs tsc typecheck first).
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.26"
|
|
cache: true
|
|
- run: go vet ./...
|
|
- run: go test ./...
|
|
- run: go build ./...
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
- name: frontend build
|
|
working-directory: frontend
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
|
|
# Build and push the three images to the Gitea container registry. Runs only
|
|
# on pushes to main / tags. Uses a PAT with write:package scope (the automatic
|
|
# GITEA_TOKEN cannot push packages), stored as the REGISTRY_TOKEN secret.
|
|
images:
|
|
needs: validate
|
|
if: github.event_name != 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { name: checker, dockerfile: deploy/Dockerfile.checker }
|
|
- { name: api, dockerfile: deploy/Dockerfile.api }
|
|
- { name: web, dockerfile: deploy/Dockerfile.web }
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to Gitea registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME || 'omar' }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.IMAGE_BASE }}/${{ matrix.name }}
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=tag
|
|
type=sha,prefix=sha-
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
|
|
- name: Build and push ${{ matrix.name }}
|
|
uses: docker/build-push-action@v6
|
|
env:
|
|
DOCKER_BUILD_RECORD_UPLOAD: "false"
|
|
DOCKER_BUILD_SUMMARY: "false"
|
|
with:
|
|
context: .
|
|
file: ${{ matrix.dockerfile }}
|
|
platforms: linux/amd64
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|