Anthonyg5005's picture
Add github mirror - hourly update
5857c7f verified
raw
history blame
877 Bytes
name: Clone from Hugging Face
on:
schedule:
- cron: '0 * * * *' # <-- run every hour at the start of the hour
workflow_dispatch:
jobs:
clone:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Clone from Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_ACCESS_TOKEN }}
github_token: ${{ secrets.WORKFLOW_TOKEN }}
run: |
git clone https://Anthonyg5005:$HF_TOKEN@huggingface.co/Anthonyg5005/hf-scripts
cd hf-scripts
# Now, push to the original GitHub repository with username and token
git remote set-url origin https://Anthonyg5005:${{ secrets.WORKFLOW_TOKEN }}@github.com/Anthonyg5005/hf-scripts.git
git push --mirror
#AI Generated code, don't know how to use gh actions