Skip to content

Commit

Permalink
Merge pull request #2 from x-mirrors/dev
Browse files Browse the repository at this point in the history
fix cache and split k8s/fb to single repo [skip ci]
  • Loading branch information
xiexianbin committed Jul 30, 2023
2 parents a690e55 + c9b632d commit 9708dfc
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 166 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/argoproj.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ jobs:
gitee: argoproj

steps:
- name: Cache src repo
uses: actions/cache@v3
id: cache-src-repo
# https://github.com/actions/cache/blob/main/restore/README.md#outputs
- name: Restore cached repo
id: restore-cached-repo
uses: actions/cache/restore@v3
with:
path: ${{ github.workspace }}/git-mirrors-cache
path: |
${{ github.workspace }}/git-mirrors-cache
key: ${{ runner.os }}-${{ matrix.github }}-cache
restore-keys: ${{ runner.os }}-${{ matrix.github }}-cache

- name: Organization ${{ matrix.github }} mirror
if: ${{ always() }}
Expand Down Expand Up @@ -67,3 +68,12 @@ jobs:
else
echo "empty"
fi
# https://github.com/actions/cache/blob/main/save/README.md
- name: Save repo cache
id: save-repo-cache
uses: actions/cache/save@v3
with:
path: |
${{ github.workspace }}/git-mirrors-cache
key: ${{ steps.restore-cached-repo.outputs.cache-primary-key }}
69 changes: 0 additions & 69 deletions .github/workflows/facebookresearch.yml

This file was deleted.

20 changes: 15 additions & 5 deletions .github/workflows/influxdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ jobs:
gitee: influxdata

steps:
- name: Cache src repo
uses: actions/cache@v3
id: cache-src-repo
# https://github.com/actions/cache/blob/main/restore/README.md#outputs
- name: Restore cached repo
id: restore-cached-repo
uses: actions/cache/restore@v3
with:
path: ${{ github.workspace }}/git-mirrors-cache
path: |
${{ github.workspace }}/git-mirrors-cache
key: ${{ runner.os }}-${{ matrix.github }}-cache
restore-keys: ${{ runner.os }}-${{ matrix.github }}-cache

- name: Organization ${{ matrix.github }} mirror
if: ${{ always() }}
Expand Down Expand Up @@ -67,3 +68,12 @@ jobs:
else
echo "empty"
fi
# https://github.com/actions/cache/blob/main/save/README.md
- name: Save repo cache
id: save-repo-cache
uses: actions/cache/save@v3
with:
path: |
${{ github.workspace }}/git-mirrors-cache
key: ${{ steps.restore-cached-repo.outputs.cache-primary-key }}
20 changes: 15 additions & 5 deletions .github/workflows/istio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ jobs:
gitee: x-istio

steps:
- name: Cache src repo
uses: actions/cache@v3
id: cache-src-repo
# https://github.com/actions/cache/blob/main/restore/README.md#outputs
- name: Restore cached repo
id: restore-cached-repo
uses: actions/cache/restore@v3
with:
path: ${{ github.workspace }}/git-mirrors-cache
path: |
${{ github.workspace }}/git-mirrors-cache
key: ${{ runner.os }}-${{ matrix.github }}-cache
restore-keys: ${{ runner.os }}-${{ matrix.github }}-cache

- name: Organization ${{ matrix.github }} mirror
if: ${{ always() }}
Expand Down Expand Up @@ -67,3 +68,12 @@ jobs:
else
echo "empty"
fi
# https://github.com/actions/cache/blob/main/save/README.md
- name: Save repo cache
id: save-repo-cache
uses: actions/cache/save@v3
with:
path: |
${{ github.workspace }}/git-mirrors-cache
key: ${{ steps.restore-cached-repo.outputs.cache-primary-key }}
69 changes: 0 additions & 69 deletions .github/workflows/kubernetes.yml

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

|Source|Target|Sync Account|Repo Count|Status|
|:---|:---|:---|:---|:---|
|[github.com/argoproj](https://github.com/argoproj)|[gitee.com/argoproj](https://gitee.com/argoproj)|-|-||
|[github.com/facebookresearch](https://github.com/facebookresearch)|[gitee.com/facebookresearch](https://gitee.com/facebookresearch)|-|-||
|[github.com/influxdata](https://github.com/influxdata)|[gitee.com/influxdata](https://gitee.com/influxdata)|-|-||
|[github.com/istio](https://github.com/istio)|[gitee.com/x-istio](https://gitee.com/x-istio)|-|-||
|[github.com/kubernetes](https://github.com/kubernetes)|[gitee.com/x-kubernetes](https://gitee.com/x-kubernetes)|-|-||
|[github.com/argoproj](https://github.com/argoproj)|[gitee.com/argoproj](https://gitee.com/argoproj)|-|-|[![github.com/argoproj](https://github.com/x-mirrors/gitee/actions/workflows/argoproj.yml/badge.svg)](https://github.com/x-mirrors/gitee/actions/workflows/argoproj.yml)|
|[github.com/facebookresearch](https://github.com/facebookresearch)|[gitee.com/facebookresearch](https://gitee.com/facebookresearch)|-|-|[![github.com/facebookresearch](https://github.com/x-mirrors/gitee/actions/workflows/facebookresearch.yml/badge.svg)](https://github.com/x-mirrors/gitee/actions/workflows/facebookresearch.yml)|
|[github.com/influxdata](https://github.com/influxdata)|[gitee.com/influxdata](https://gitee.com/influxdata)|-|-|[![github.com/influxdata](https://github.com/x-mirrors/gitee/actions/workflows/influxdata.yml/badge.svg)](https://github.com/x-mirrors/gitee/actions/workflows/influxdata.yml)|
|[github.com/istio](https://github.com/istio)|[gitee.com/x-istio](https://gitee.com/x-istio)|-|-|[![github.com/istio](https://github.com/x-mirrors/gitee/actions/workflows/istio.yml/badge.svg)](https://github.com/x-mirrors/gitee/actions/workflows/istio.yml)|
|[github.com/kubernetes](https://github.com/kubernetes)|[gitee.com/x-kubernetes](https://gitee.com/x-kubernetes)|-|-|[![github.com/kubernetes](https://github.com/x-mirrors/gitee/actions/workflows/kubernetes.yml/badge.svg)](https://github.com/x-mirrors/gitee/actions/workflows/kubernetes.yml)|

## 新增同步需求

Expand Down
6 changes: 5 additions & 1 deletion hack/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@ def readme(self):
'target': f'[gitee.com/{dest}](https://gitee.com/{dest})',
'sync_account': '-',
'repo_count': self.get_repo_count(src),
'status': '',
'status': f'[![github.com/{src}](https://github.com/x-mirrors/gitee/actions/workflows/{src}.yml/badge.svg)](https://github.com/x-mirrors/gitee/actions/workflows/{src}.yml)',
})

print(f'## {src} Mirror\n')
print(f'- sync from https://github.com/{src} by [x-mirrors/gitee](https://github.com/x-mirrors/gitee)')
print(f'- 其他同步需求:发送邮件到 `me@xiexianbin.cn` 或在 https://github.com/x-mirrors/gitee/ 提交 `issue`\n')

target_lines = sorted(target_lines, key=lambda x: x['source'])
for i in target_lines:
mk_lines.append(
Expand Down
2 changes: 0 additions & 2 deletions hack/sync.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# <github group> <gitee group>
argoproj argoproj
facebookresearch facebookresearch
influxdata influxdata
istio x-istio
kubernetes x-kubernetes
20 changes: 15 additions & 5 deletions hack/sync.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ jobs:
gitee: {{ gitee_org }}
{% raw %}
steps:
- name: Cache src repo
uses: actions/cache@v3
id: cache-src-repo
# https://github.com/actions/cache/blob/main/restore/README.md#outputs
- name: Restore cached repo
id: restore-cached-repo
uses: actions/cache/restore@v3
with:
path: ${{ github.workspace }}/git-mirrors-cache
path: |
${{ github.workspace }}/git-mirrors-cache
key: ${{ runner.os }}-${{ matrix.github }}-cache
restore-keys: ${{ runner.os }}-${{ matrix.github }}-cache

- name: Organization ${{ matrix.github }} mirror
if: ${{ always() }}
Expand Down Expand Up @@ -67,4 +68,13 @@ jobs:
else
echo "empty"
fi

# https://github.com/actions/cache/blob/main/save/README.md
- name: Save repo cache
id: save-repo-cache
uses: actions/cache/save@v3
with:
path: |
${{ github.workspace }}/git-mirrors-cache
key: ${{ steps.restore-cached-repo.outputs.cache-primary-key }}
{% endraw %}

0 comments on commit 9708dfc

Please sign in to comment.