Connect Your CI / GitHub Actions
Your builds keep running on GitHub's runners. This workflow just tells UnityFreak whether the build passed, so required status checks work on a UnityFreak-hosted repository the same way they do on a GitHub one.
repo:write-scoped token under Settings → Personal Access Tokens, store it as the Actions secret UF_API_KEY.curl calls to your workflow — one pending before the test step, one success/failure after it.ci/tests context to Required Status Checks in the repository's UnityFreak settings.UnityFreak's commit-status API is intentionally GitHub-compatible: a CI system posts a state (pending, success, failure, or error) tagged with a context name, and repository settings can require that context to be green before a merge is allowed. Nothing about your build has to change — only the two extra requests reporting the outcome.
Under Settings → Personal Access Tokens, create a token scoped to repo:write — this is the same scope used for git push, and it's what authorizes posting a status.
In the GitHub repository's Settings → Secrets and variables → Actions, add:
UF_API_KEY (secret) — the token from step 2.UF_OWNER and UF_REPO (variables) — the owner and repository slug as they appear in your UnityFreak clone URL.Drop this in as (or add to) your existing test workflow:
name: Report status to UnityFreak
on:
push:
branches: ['**']
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Mark pending on UnityFreak
run: |
curl -sf -X POST \
"https://api.unityfreak.com/api/v1/repos/${{ vars.UF_OWNER }}/${{ vars.UF_REPO }}/statuses/${{ github.sha }}" \
-H "X-API-Key: ${{ secrets.UF_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"state":"pending","context":"ci/tests","targetUrl":"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}'
- name: Install and test
id: run_tests
run: |
npm ci
npm test
- name: Report result to UnityFreak
if: always()
run: |
STATE="${{ steps.run_tests.outcome == 'success' && 'success' || 'failure' }}"
curl -sf -X POST \
"https://api.unityfreak.com/api/v1/repos/${{ vars.UF_OWNER }}/${{ vars.UF_REPO }}/statuses/${{ github.sha }}" \
-H "X-API-Key: ${{ secrets.UF_API_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"state\":\"$STATE\",\"context\":\"ci/tests\",\"targetUrl\":\"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}"
The if: always() on the final step is what makes the failure case report correctly — without it, a failed test step would skip straight past the status-reporting step and leave the check stuck on pending forever.
In the repository's branch protection settings on UnityFreak, add ci/tests (or whatever context you chose) to Required Status Checks. The context only appears in that picker after it's been reported at least once, so push a commit through the workflow above first.
This recipe assumes the repository UnityFreak is gating already lives there — either imported once or kept in sync. If you'd rather keep GitHub as the system of record and mirror to UnityFreak, add a push-mirror remote:
git remote add unityfreak https://unityfreak.com/OWNER/REPO.git
git push unityfreak --mirrorSee Import a Repository from Another Host for the first-time import with full history, and Git's own --mirror flag docs for keeping it in sync on an ongoing basis.