-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (57 loc) · 2.17 KB
/
Copy pathmirror-to-osp.yml
File metadata and controls
62 lines (57 loc) · 2.17 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
name: Mirror Interested-Deving-1896 → OSP
on:
schedule:
# Hourly at :00 — runs before the injected mirror-osp-to-ooc.yaml (:15)
# so the full chain completes within the same hour:
# :00 this job → pushes upstream content into OSP
# :15 per-repo → OSP repos push themselves into OOC
- cron: '0 * * * *'
workflow_dispatch:
inputs:
repo_filter:
description: "Mirror only this repo name (leave blank for all)"
required: false
default: ""
type: string
dry_run:
description: "Report without pushing to OSP"
required: false
default: false
type: boolean
force:
description: "Force-push even if OSP branch has diverged"
required: false
default: false
type: boolean
permissions:
contents: read
# ── Rate limits ──────────────────────────────────────────────────────────────
# GitHub REST API (SYNC_TOKEN): 5 000 req/hr primary limit.
# mirror-to-osp.sh retries HTTP 403/429 up to 3 times, sleeping until
# X-RateLimit-Reset before each retry.
# git push: transient rejections retried up to 3 times with 5 s backoff.
# SYNC_TOKEN requires the `workflow` scope to push repos containing
# .github/workflows/ — a missing scope logs a clear error and skips that
# repo rather than retrying indefinitely.
jobs:
mirror:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Mirror matched repos from upstream into OSP
env:
GH_TOKEN: ${{ secrets.SYNC_TOKEN }}
UPSTREAM_OWNER: Interested-Deving-1896
OSP_ORG: OpenOS-Project-OSP
REPO_FILTER: ${{ inputs.repo_filter || '' }}
DRY_RUN: ${{ inputs.dry_run || 'false' }}
FORCE: ${{ inputs.force || 'false' }}
run: bash scripts/mirror-to-osp.sh
- name: Write summary
if: always()
env:
JOB_STATUS: ${{ job.status }}
INPUTS_JSON: ${{ toJSON(inputs) }}
run: bash scripts/write-summary.sh