Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/mirror-osp-to-ooc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Mirror to OpenOS-Project-Ecosystem-OOC

# Sync chain:
# Interested-Deving-1896 ->(upstream mirror.yaml)-> OpenOS-Project-OSP
# OpenOS-Project-OSP ->(this file)-> OpenOS-Project-Ecosystem-OOC

on:
push:
branches: ["**"]
tags: ["**"]
schedule:
# Runs 15 minutes after the upstream->OSP sync to allow OSP to settle
- cron: "15 * * * *"
workflow_dispatch:

jobs:
mirror:
runs-on: ubuntu-latest
# Only run when executing in the OSP repo — no-op if mirrored elsewhere
if: github.repository == 'OpenOS-Project-OSP/pkg-kde-dev-scripts'
steps:
- name: Checkout full history
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false

- name: Fetch all branches and tags
run: git fetch --all --tags --prune

- name: Push mirror to OpenOS-Project-Ecosystem-OOC
env:
MIRROR_TOKEN: ${{ secrets.MIRROR_TOKEN }}
run: |
git config --global credential.helper store
printf 'https://x-access-token:%s@github.com\n' "$MIRROR_TOKEN" \
> ~/.git-credentials

git remote add mirror \
"https://github.com/OpenOS-Project-Ecosystem-OOC/pkg-kde-dev-scripts.git"

git push mirror --all --force
git push mirror --tags --force

rm -f ~/.git-credentials