-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (72 loc) · 1.91 KB
/
argoproj.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
name: argoproj
on:
workflow_dispatch:
inputs:
reason:
description: 'run action reason'
required: false
type: string
default: 'manually test'
schedule:
- cron: '5 0 */6 * *'
push:
branches:
- main
- dev
- bug/**
- fix/**
- bugfix/**
- feature/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
orgs:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- github: argoproj
gitee: argoproj
steps:
# 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
key: ${{ runner.os }}-${{ matrix.github }}-cache
- name: Organization ${{ matrix.github }} mirror
if: ${{ always() }}
uses: x-actions/git-mirrors@main
with:
src: github/${{ matrix.github }}
src_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
dst: gitee/${{ matrix.gitee }}
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
dst_token: ${{ secrets.GITEE_TOKEN }}
account_type: org
clone_style: ssh
debug: true
- name: Print cache path
continue-on-error: true
run: |
set -x
echo "whoami is `whoami`"
dir="${{ github.workspace }}/git-mirrors-cache"
if [ -d "${dir}" ]; then
sudo chmod a+r -R ${dir}
ls -lhart ${dir}
tree -L 2 ${dir}
du -lh -d 1
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 }}