mirror of
https://github.com/multipleof4/gitea-github-cron.git
synced 2026-10-08 21:35:21 +00:00
Sync descriptions and issues, run workflows nightly
mirror.js now keeps repo descriptions in step with GitHub. A new sync-issues workflow copies issues, PR conversations and comments onto the mirrors with GitHub's numbering. Shared API helpers move to gitea-mirrors.js. Every workflow now runs once a night, 1.5 hours apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ on:
|
||||
type: boolean
|
||||
default: false
|
||||
schedule:
|
||||
- cron: '0 */4 * * *' # Run every 4 hours
|
||||
- cron: '0 5 * * *' # 12 AM CDT
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
name: Sync issues to Gitea
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 9 * * *' # 4:30 AM CDT
|
||||
|
||||
concurrency:
|
||||
group: sync-issues
|
||||
|
||||
jobs:
|
||||
issues:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
- name: Copy GitHub issues and PRs to Gitea mirrors
|
||||
id: sync
|
||||
run: node sync-issues.js
|
||||
env:
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
GITEA_URL: ${{ secrets.GITEA_URL }}
|
||||
|
||||
- name: Notify via ntfy
|
||||
if: ${{ always() }}
|
||||
run: node notify.js
|
||||
env:
|
||||
NTFY_TOPIC_URL: ${{ secrets.NTFY_TOPIC_URL }}
|
||||
WORKFLOW_KIND: issues
|
||||
STEP_OUTCOME: ${{ steps.sync.outcome }}
|
||||
RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
@@ -3,7 +3,7 @@ name: Sync releases to Gitea
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 */4 * * *' # Every 4 hours, 30 min after the mirror run
|
||||
- cron: '30 6 * * *' # 1:30 AM CDT
|
||||
|
||||
concurrency:
|
||||
group: sync-releases
|
||||
|
||||
Reference in New Issue
Block a user