-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (83 loc) · 2.22 KB
/
rook.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: rook
on:
schedule:
- cron: '0 0 8 * *'
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
sync-quay:
runs-on: ubuntu-20.04
container: setzero/registry-manager
env:
TO_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
TO_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
steps:
- name: Quay to Aliyun
run: |
cat << EOF >config.yaml
registries:
aliyuncs:
registry: https://registry.aliyuncs.com
username: $TO_USERNAME
password: $TO_PASSWORD
quay:
registry: https://quay.io
repositories:
- cephcsi/cephcsi
sync-policy:
from: quay
to: aliyuncs
dry-run: false
replace:
- old: cephcsi/
new: it00021hot/
filters:
- ^[Vv]?\d+\.\d+(\.\d+)?(-\d+)?$
EOF
registry-manager sync -c config.yaml
- name: Delete workflow runs
uses: GitRML/delete-workflow-runs@main
with:
retain_days: 7
keep_minimum_runs: 3
sync-gcr:
runs-on: ubuntu-20.04
container: setzero/registry-manager
env:
TO_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
TO_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
steps:
- name: Gcr to Aliyun
run: |
cat << EOF >config.yaml
registries:
aliyuncs:
registry: https://registry.aliyuncs.com
username: $TO_USERNAME
password: $TO_PASSWORD
quay:
registry: https://k8s.gcr.io
repositories:
- sig-storage/csi-node-driver-registrar
- sig-storage/csi-attacher
- sig-storage/csi-provisioner
- sig-storage/csi-snapshotter
- sig-storage/csi-resizer
sync-policy:
from: quay
to: aliyuncs
dry-run: false
replace:
- old: sig-storage/
new: it00021hot/
filters:
- ^[Vv]?\d+\.\d+(\.\d+)?(-\d+)?$
EOF
registry-manager sync -c config.yaml
- name: Delete workflow runs
uses: GitRML/delete-workflow-runs@main
with:
retain_days: 7
keep_minimum_runs: 3