forked from cdnjs/cdnjs
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 959 Bytes
/
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
name: sync
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
inputs:
push_freq:
description: 'Push frequency'
type: number
required: true
jobs:
sync:
concurrency: sync
runs-on: self-hosted
steps:
- name: clean
run: |
shopt -s dotglob && \
rm -rf *
- name: clone
run: |
git clone \
--depth 1 \
--filter=blob:none \
--sparse \
https://${{ secrets.ROBOCDNJS_TOKEN }}@github.com/cdnjs/cdnjs.git
- name: sync
env:
PUSH_FREQ: ${{ inputs.push_freq || 5 }}
run: |
wget https://github.com/cdnjs/tools/releases/download/ccedb06b7bbe3d3db7964f5c54560b372c1a8bc13/git-sync
chmod +x ./git-sync
cd cdnjs
git config user.name robocdnjs
git config user.email [email protected]
../git-sync ./last-sync cdnjs-outgoing-prod