MirrorExternals #122
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Mirroring the packages | |
name: MirrorExternals | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '30 6 * * *' # try to update the mirrors every day. (UTC time) | |
jobs: | |
mirroring: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# All the required packages are list here. | |
PACKAGE_URL: | |
- https://gitlab.cern.ch/gaudi/Gaudi.git | |
- https://github.com/key4hep/K4FWCore.git | |
- https://github.com/key4hep/EDM4hep.git | |
- https://github.com/AIDASoft/DD4hep.git | |
- https://github.com/AIDASoft/podio.git | |
- https://github.com/cepc/GEAR | |
- https://github.com/iLCSoft/iLCUtil | |
- https://github.com/AIDASoft/aidaTT | |
steps: | |
- name: clone | |
run: | | |
echo ${PACKAGE_URL} | |
package=$(basename ${PACKAGE_URL}) | |
git clone ${PACKAGE_URL} ${package} | |
env: | |
PACKAGE_URL: ${{matrix.PACKAGE_URL}} | |
- name: mirror | |
run: | | |
package=$(basename ${PACKAGE_URL}) | |
cd ${package} | |
git remote rename origin old-origin | |
git remote add origin ${MIRROR_REPO_PREFIX}/${package} | |
git push --set-upstream origin --all | |
env: | |
PACKAGE_URL: ${{matrix.PACKAGE_URL}} | |
MIRROR_REPO_PREFIX: ${{secrets.REPO_TOKEN}} | |