mirror of
https://github.com/milk-net/milk-net.github.io.git
synced 2025-04-19 21:53:40 -05:00
Update sync_forks.yml
This commit is contained in:
parent
e59bd1c6cd
commit
7b8a2dcfe4
1 changed files with 17 additions and 16 deletions
29
.github/workflows/sync_forks.yml
vendored
29
.github/workflows/sync_forks.yml
vendored
|
@ -2,27 +2,28 @@ name: Sync Forks
|
|||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '*/20 * * * *' # Runs every 20 minutes
|
||||
workflow_dispatch: # Allows manual triggering
|
||||
- cron: '0 */1 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Git
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo apt-get install -y git
|
||||
|
||||
- name: Run Sync Script
|
||||
run: |
|
||||
mkdir -p /home/runner/work/clones
|
||||
export BASE_DIR="/home/runner/work/clones"
|
||||
python3 sync_forks.py
|
||||
python -m pip install --upgrade pip
|
||||
pip install requests
|
||||
|
||||
- name: Run sync script
|
||||
run: python sync_forks.py
|
||||
env:
|
||||
TOKEN: ${{ secrets.TOKEN }}
|
||||
|
|
Loading…
Add table
Reference in a new issue