Files
webhook-server/.github/workflows/wiki-sync.yml
justin 68706df2c5 Gitea Actions: workflow guards + .gitea release pipeline (#7)
* 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>

* Gitea release workflow: build installer + attach to Gitea release

.gitea/workflows/release.yml runs on the self-hosted Windows runner
when a v* tag is pushed (or via workflow_dispatch with a version
override for testing without bumping the project).

Mirrors the GitHub release workflow shape - dotnet test, choco-install
Inno Setup if missing, run scripts/build-installer.ps1 - then uses
Gitea's REST API directly for the release-creation + asset-upload
steps (Gitea has no equivalent to softprops/action-gh-release). Token
is the runner-injected secrets.GITHUB_TOKEN, which Gitea provides for
GitHub Actions compatibility.

Path location matters: lives under .gitea/ so GitHub Actions never
sees it, while the existing .github/workflows/release.yml stays
GitHub-only (already gated with `if: github.server_url == ...`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 12:02:04 -04:00

32 lines
880 B
YAML

name: Sync Wiki
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'scripts/sync-wiki.ps1'
- '.github/workflows/wiki-sync.yml'
workflow_dispatch:
jobs:
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
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Sync docs/ to GitHub wiki
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$repo = '${{ github.repository }}'
$wikiUrl = "https://x-access-token:$env:GH_TOKEN@github.com/$repo.wiki.git"
./scripts/sync-wiki.ps1 -WikiUrl $wikiUrl