From 1d11d58b869980b6ba97333a8d6c81900259d351 Mon Sep 17 00:00:00 2001 From: Michael Kinder <60057409+FoggyMtnDrifter@users.noreply.github.com> Date: Tue, 24 Nov 2026 22:14:33 -0500 Subject: [PATCH 1/3] Move CI to Gitea Actions Workflows live in .gitea/workflows. The upstream sync pushes with an access token, so it no longer needs the GitHub-only deploy trigger or PAT input. --- {.github => .gitea}/workflows/check.yml | 0 {.github => .gitea}/workflows/deploy.yml | 4 ++-- {.github => .gitea}/workflows/sync.yaml | 25 +++++++----------------- components/Footer.tsx | 2 +- 4 files changed, 10 insertions(+), 21 deletions(-) rename {.github => .gitea}/workflows/check.yml (100%) rename {.github => .gitea}/workflows/deploy.yml (96%) rename {.github => .gitea}/workflows/sync.yaml (56%) diff --git a/.github/workflows/check.yml b/.gitea/workflows/check.yml similarity index 100% rename from .github/workflows/check.yml rename to .gitea/workflows/check.yml diff --git a/.github/workflows/deploy.yml b/.gitea/workflows/deploy.yml similarity index 96% rename from .github/workflows/deploy.yml rename to .gitea/workflows/deploy.yml index 02d384c..8d63211 100644 --- a/.github/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -5,8 +5,8 @@ on: branches: ['main'] workflow_dispatch: -# Cottage: deploys only once the repository variable CLOUDFLARE_DEPLOY is "true" (set at launch, -# with the CLOUDFLARE_API_TOKEN secret). Until then a push to main does nothing. +# Cottage (Gitea Actions): deploys only once the repository variable CLOUDFLARE_DEPLOY is "true" (set +# at launch, with the CLOUDFLARE_API_TOKEN secret). Until then a push to main does nothing. env: WRANGLER_SEND_METRICS: 'false' diff --git a/.github/workflows/sync.yaml b/.gitea/workflows/sync.yaml similarity index 56% rename from .github/workflows/sync.yaml rename to .gitea/workflows/sync.yaml index bf4a21f..a8fd369 100644 --- a/.github/workflows/sync.yaml +++ b/.gitea/workflows/sync.yaml @@ -1,9 +1,8 @@ name: Upstream Sync -permissions: - contents: write - actions: write - +# Pulls the latest UptimeFlare code from github.com/lyc8503/UptimeFlare while keeping our +# uptime.config.ts. The push uses SYNC_TOKEN (an access token with write access to this +# repository) so that it starts the Deploy workflow like any other push to main. on: workflow_dispatch: inputs: @@ -12,9 +11,6 @@ on: type: boolean required: true default: false - override-token: - description: '[Optional] Paste a PAT here. If left blank, PAT_TOKEN secret will be used (if set). Used to solve `refusing to allow a GitHub App to create or update workflow... `, more info at https://github.com/lyc8503/UptimeFlare/wiki/Synchronize-updates-from-upstream#upgrade-methods' - required: false jobs: sync_latest_from_upstream: @@ -23,9 +19,9 @@ jobs: steps: - name: Checkout target repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: - token: ${{ inputs.override-token || secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} + token: ${{ secrets.SYNC_TOKEN }} - name: Current config run: | @@ -33,10 +29,9 @@ jobs: cp uptime.config.ts /tmp/origin.config.ts - name: Sync upstream changes - id: sync run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config user.name "Cottage status sync" + git config user.email "noreply@cottage.host" # Fetch latest code git clone https://github.com/lyc8503/UptimeFlare /tmp/latest @@ -49,9 +44,3 @@ jobs: git add . git commit -m "Sync latest code from upstream" git push - - - name: Trigger deployment - if: ${{ inputs.override-token == '' }} - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: deploy.yml diff --git a/components/Footer.tsx b/components/Footer.tsx index 7ba84c6..be10117 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -23,7 +23,7 @@ export default function Footer() { Built on{' '} UptimeFlare, open source ( - our copy) + our copy) -- 2.54.1 From 2fe7fb386bcc480ef462ce93da1a242fa4075294 Mon Sep 17 00:00:00 2001 From: Michael Kinder <60057409+FoggyMtnDrifter@users.noreply.github.com> Date: Tue, 24 Nov 2026 22:40:34 -0500 Subject: [PATCH 2/3] CI: don't use the npm cache (restoring it stalls on the runner) --- .gitea/workflows/check.yml | 1 - .gitea/workflows/deploy.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index 8c6c68e..e7db4af 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -19,7 +19,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 22.x - cache: 'npm' - run: npm ci - run: cd worker && npm ci - name: Lint and types diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 8d63211..22f0d14 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -26,7 +26,6 @@ jobs: uses: actions/setup-node@v3 with: node-version: 22.x - cache: 'npm' # Automatically get an account id via the API Token # if secrets.CLOUDFLARE_ACCOUNT_ID is not set. -- 2.54.1 From 303016681ac69424a53bcdfc2dc66d2d1d6f740e Mon Sep 17 00:00:00 2001 From: Michael Kinder <60057409+FoggyMtnDrifter@users.noreply.github.com> Date: Tue, 24 Nov 2026 22:49:36 -0500 Subject: [PATCH 3/3] CI: use the npm cache again (the runners' cache server is reachable now) --- .gitea/workflows/check.yml | 1 + .gitea/workflows/deploy.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitea/workflows/check.yml b/.gitea/workflows/check.yml index e7db4af..8c6c68e 100644 --- a/.gitea/workflows/check.yml +++ b/.gitea/workflows/check.yml @@ -19,6 +19,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 22.x + cache: 'npm' - run: npm ci - run: cd worker && npm ci - name: Lint and types diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 22f0d14..8d63211 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -26,6 +26,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: 22.x + cache: 'npm' # Automatically get an account id via the API Token # if secrets.CLOUDFLARE_ACCOUNT_ID is not set. -- 2.54.1