-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (66 loc) · 2.36 KB
/
Copy pathsync-registered-imports.yml
File metadata and controls
72 lines (66 loc) · 2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Sync Registered Imports
# Re-syncs all repos registered in registered-imports.json.
# For each entry, bare-clones the source URL and pushes all branches + tags
# to the Interested-Deving-1896 counterpart.
on:
schedule:
- cron: '55 * * * *' # Hourly at :55
workflow_dispatch:
inputs:
repo_filter:
description: "Repo name substring filter (blank = all)"
required: false
default: ""
type: string
dry_run:
description: "Report without pushing"
required: false
default: false
type: boolean
source_filter:
description: "Only sync entries from this source host (github/gitlab/gitea/bitbucket)"
required: false
default: ""
type: choice
options:
- ""
- github
- gitlab
- gitea
- bitbucket
rate_limit_rerun:
description: "Set by rate-limit-rerun workflow — prevents re-trigger loops"
required: false
default: "false"
type: string
permissions:
contents: write
# ── Rate limits ──────────────────────────────────────────────────────────────
# No REST API polling — only git clone from source + git push to GitHub.
# git_push_retry() retries up to 3 times with linear backoff (15 s, 30 s,
# 45 s) on any push failure. Clone failures are logged and skipped; the
# entry will be retried on the next hourly run.
jobs:
sync:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Sync registered imports
env:
GH_TOKEN: ${{ secrets.SYNC_TOKEN }}
GITHUB_OWNER: Interested-Deving-1896
GITLAB_TOKEN: ${{ secrets.GITLAB_SYNC_TOKEN }}
BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_TOKEN }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
REPO_FILTER: ${{ inputs.repo_filter || '' }}
DRY_RUN: ${{ inputs.dry_run || 'false' }}
SOURCE_FILTER: ${{ inputs.source_filter || '' }}
run: bash scripts/sync-registered-imports.sh
- name: Write summary
if: always()
env:
JOB_STATUS: ${{ job.status }}
INPUTS_JSON: ${{ toJSON(inputs) }}
run: bash scripts/write-summary.sh