CI: skip GitHub-specific workflows on Gitea Actions; add workflow_dispatch
Gitea reads .github/workflows/ for compatibility, so without guards it tries to run the release and wiki-sync workflows on Gitea too - which fail because they use softprops/action-gh-release@v2 (GitHub-only) and push to GitHub-hosted wiki URLs. Add `if: github.server_url == 'https://github.com'` to the release-builder and wiki-sync jobs so Gitea no-ops them. ci.yml (plain dotnet build + test) still runs on both, and now also accepts workflow_dispatch so it can be triggered by hand to verify a self- hosted runner is picking up jobs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-installer:
|
build-installer:
|
||||||
|
# Gitea reads .github/workflows/ for compatibility, but the create-release
|
||||||
|
# step uses a GitHub-only action. Skip the whole job on non-GitHub runners.
|
||||||
|
if: github.server_url == 'https://github.com'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write # needed to create releases / upload assets
|
contents: write # needed to create releases / upload assets
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync:
|
sync:
|
||||||
|
# Gitea reads .github/workflows/ for compatibility, but this workflow
|
||||||
|
# pushes to a GitHub-hosted wiki. Skip on non-GitHub runners; the Gitea
|
||||||
|
# wiki is synced separately via scripts/sync-wiki.ps1.
|
||||||
|
if: github.server_url == 'https://github.com'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|||||||
Reference in New Issue
Block a user