-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.19 KB
/
main.yml
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
# 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
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}}