ci: restrict workflows to main branch

This commit is contained in:
2026-10-30 03:44:05 +08:00
parent a80448ae36
commit 10a50e32db
4 changed files with 8 additions and 5 deletions
+4 -3
View File
@@ -11,8 +11,7 @@ name: ci
on:
push:
branches: [main, "ci/**"]
pull_request:
branches: [main]
workflow_dispatch:
env:
@@ -20,6 +19,7 @@ env:
jobs:
python:
if: gitea.ref == 'refs/heads/main'
runs-on: ubuntu24.04-x64-lean4.35
timeout-minutes: 20
steps:
@@ -50,6 +50,7 @@ jobs:
.venv/bin/lean-bench doctor --skip-llm --env /dev/null
lean:
if: gitea.ref == 'refs/heads/main'
needs: python
runs-on: ubuntu24.04-x64-lean4.35
timeout-minutes: 150
@@ -82,7 +83,7 @@ jobs:
image:
needs: [python, lean]
if: github.event_name != 'pull_request'
if: ${{ gitea.ref == 'refs/heads/main' && (github.event_name != 'pull_request') }}
runs-on: ubuntu24.04-x64-lean4.35
timeout-minutes: 180
steps: