-
Notifications
You must be signed in to change notification settings - Fork 8
88 lines (82 loc) · 2.86 KB
/
sync.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
87
88
name: sync
permissions:
contents: read
pull-requests: read
actions: read
defaults:
run:
shell: bash
on:
workflow_dispatch:
inputs:
max_releases:
description: "Maximum number of latest releases to sync"
required: false
default: 1
type: number
specific_release_tag:
description: "Specific release tag to sync"
required: false
default: ""
type: string
dry_run:
description: "Skip the actual sync"
required: false
default: false
type: boolean
schedule:
- cron: "0 */12 * * *" # every 12 hours
jobs:
gitcode:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-22.04
timeout-minutes: 240
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Sync
uses: gpustack/.github/.github/actions/mirror-release-gitcode@main
with:
gitcode-username: "${{ secrets.CI_GITCODE_USERNAME }}"
gitcode-password: "${{ secrets.CI_GITCODE_PASSWORD }}"
gitcode-token: "${{ secrets.CI_GITCODE_TOKEN }}"
max-releases: "${{ inputs.max_releases && inputs.max_releases || '1' }}"
specific-release-tag: "${{ inputs.specific_release_tag && inputs.specific_release_tag || '' }}"
code-only: true
dry-run: "${{ inputs.dry_run && inputs.dry_run || 'false' }}"
gitee:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Sync
uses: gpustack/.github/.github/actions/mirror-release-gitee@main
with:
gitee-username: "${{ secrets.CI_GITEE_USERNAME }}"
gitee-token: "${{ secrets.CI_GITEE_TOKEN }}"
max-releases: "${{ inputs.max_releases && inputs.max_releases || '1' }}"
specific-release-tag: "${{ inputs.specific_release_tag && inputs.specific_release_tag || '' }}"
code-only: true
dry-run: "${{ inputs.dry_run && inputs.dry_run || 'false' }}"
tencent-cos:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Sync
uses: gpustack/.github/.github/actions/mirror-release-tencent-cos@main
with:
tencent-secret-id: "${{ secrets.CI_TECENTCOS_SECRET_ID }}"
tencent-secret-key: "${{ secrets.CI_TECENTCOS_SECRET_KEY }}"
tencent-cos-region: "ap-guangzhou"
tencent-cos-bucket: "gpustack-1303613262"
max-releases: "${{ inputs.max_releases && inputs.max_releases || '1' }}"
specific-release-tag: "${{ inputs.specific_release_tag && inputs.specific_release_tag || '' }}"
dry-run: "${{ inputs.dry_run && inputs.dry_run || 'false' }}"