sync #1646
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |