feat: finalize gitea automation with default source and publish-ready dist

This commit is contained in:
袁震
2026-04-06 11:56:27 +08:00
parent b9ac36321a
commit 8f3f7469bc
21 changed files with 46764 additions and 10 deletions
+9 -1
View File
@@ -14,6 +14,7 @@ jobs:
steps:
- name: Validate required secrets
id: preflight
shell: bash
run: |
missing=0
@@ -24,8 +25,10 @@ jobs:
fi
done
if [ "$missing" -ne 0 ]; then
exit 1
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "skip=false" >> "$GITHUB_OUTPUT"
env:
GITEA_BASE_URL: ${{ secrets.GITEA_BASE_URL }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
@@ -35,14 +38,17 @@ jobs:
TARGET_REPO: ${{ secrets.TARGET_REPO }}
- name: Checkout generator repo
if: steps.preflight.outputs.skip != 'true'
uses: actions/checkout@v4
- name: Setup Python
if: steps.preflight.outputs.skip != 'true'
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build runtime config
if: steps.preflight.outputs.skip != 'true'
shell: bash
run: |
SOURCE_REF="${SOURCE_REF:-main}"
@@ -79,11 +85,13 @@ jobs:
CLASH_NO_RESOLVE: ${{ vars.CLASH_NO_RESOLVE }}
- name: Generate rules
if: steps.preflight.outputs.skip != 'true'
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: python3 main.py --config config.runtime.json
- name: Publish dist to target repo branch
if: steps.preflight.outputs.skip != 'true'
shell: bash
run: |
set -euo pipefail