ci: 只在 GitHub 上触发,Gitea 侧跳过

Gitea 会扫描 .github/workflows,v1.0.1 推送后它排了一个永远 queued 的任务。
用 github.server_url 做判断:只有 https://github.com 才执行。
This commit is contained in:
liyp
2026-10-23 13:13:58 +08:00
parent 4298611c2c
commit 2a9f26b952
+3
View File
@@ -25,6 +25,8 @@ concurrency:
jobs:
test:
name: End-to-end tests
# Gitea also discovers .github/workflows; this keeps the run on GitHub only.
if: github.server_url == 'https://github.com'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -43,6 +45,7 @@ jobs:
release:
name: Build and publish
needs: test
if: github.server_url == 'https://github.com'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4