File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Mirror to OpenOS-Project-Ecosystem-OOC
2+
3+ # Sync chain:
4+ # Interested-Deving-1896 ->(upstream mirror.yaml)-> OpenOS-Project-OSP
5+ # OpenOS-Project-OSP ->(this file)-> OpenOS-Project-Ecosystem-OOC
6+
7+ on :
8+ push :
9+ branches : ["**"]
10+ tags : ["**"]
11+ schedule :
12+ # Runs 15 minutes after the upstream->OSP sync to allow OSP to settle
13+ - cron : " 15 * * * *"
14+ workflow_dispatch :
15+
16+ jobs :
17+ mirror :
18+ runs-on : ubuntu-latest
19+ # Only run when executing in the OSP repo — no-op if mirrored elsewhere
20+ if : github.repository == 'OpenOS-Project-OSP/pkg-kde-jenkins'
21+ steps :
22+ - name : Checkout full history
23+ uses : actions/checkout@v4
24+ with :
25+ fetch-depth : 0
26+ persist-credentials : false
27+
28+ - name : Fetch all branches and tags
29+ run : git fetch --all --tags --prune
30+
31+ - name : Push mirror to OpenOS-Project-Ecosystem-OOC
32+ env :
33+ MIRROR_TOKEN : ${{ secrets.MIRROR_TOKEN }}
34+ run : |
35+ git config --global credential.helper store
36+ printf 'https://x-access-token:%s@github.com\n' "$MIRROR_TOKEN" \
37+ > ~/.git-credentials
38+
39+ git remote add mirror \
40+ "https://github.com/OpenOS-Project-Ecosystem-OOC/pkg-kde-jenkins.git"
41+
42+ git push mirror --all --force
43+ git push mirror --tags --force
44+
45+ rm -f ~/.git-credentials
You can’t perform that action at this time.
0 commit comments