Move CI to Gitea Actions #1
No files matched your search
File renamed without changes.
@@ -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'
|
||||
|
||||
@@ -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 "[email protected]"
|
||||
|
||||
# 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
|
||||
@@ -23,7 +23,7 @@ export default function Footer() {
|
||||
<span>
|
||||
Built on{' '}
|
||||
<a href="https://github.com/lyc8503/UptimeFlare">UptimeFlare</a>, open source (
|
||||
<a href="https://github.com/cottage-host/status">our copy</a>)
|
||||
<a href="https://git.cottage.host/cottage/status">our copy</a>)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user