Skip to content

Mirror upstream repositories #44

Mirror upstream repositories

Mirror upstream repositories #44

Workflow file for this run

name: Mirror upstream repositories
on:
workflow_dispatch:
schedule:
- cron: '30 05 * * *'
jobs:
build:
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
repo:
- ONLYOFFICE/build_tools
- ONLYOFFICE/core
- ONLYOFFICE/core-fonts
- ONLYOFFICE/DesktopEditors
- ONLYOFFICE/desktop-apps
- ONLYOFFICE/desktop-sdk
- ONLYOFFICE/dictionaries
- ONLYOFFICE/Docker-DocumentServer
- ONLYOFFICE/document-formats
- ONLYOFFICE/document-server-integration
- ONLYOFFICE/document-server-package
- ONLYOFFICE/document-templates
- ONLYOFFICE/onlyoffice.github.io
- ONLYOFFICE/onlyoffice-nextcloud
- ONLYOFFICE/sdkjs
- ONLYOFFICE/sdkjs-forms
- ONLYOFFICE/server
- ONLYOFFICE/web-apps
- ONLYOFFICE-data/build_tools_data
steps:
- name: Checkout runner workspace
run: |
# Split repo name into owner and repo parts
IFS='/' read -r owner repo <<< "${{ matrix.repo }}"
mkdir -p tmp-repo
cd tmp-repo
git config --global user.name "Euro-Office via GitHub Actions"
git clone --bare https://github.com/${{ matrix.repo }}.git
cd $repo.git
git fetch --all
git remote add eurooffice https://x-access-token:${{ env.GITHUB_TOKEN }}@github.com/Euro-Office/${repo}.git
# Push all branches and tags from the cloned bare repository to the eurooffice remote.
# Avoid --mirror because it can delete branches on the target that exist only there.
git push eurooffice --all
git push eurooffice --tags
env:
GITHUB_TOKEN: ${{ secrets.EURO_OFFICE_MIRROR_TOKEN }}