name: Clone from Hugging Face | |
on: | |
schedule: | |
- cron: '0 0 * * *' # <-- update daily | |
workflow_dispatch: | |
jobs: | |
clone: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
repository: Anthonyg5005/hf-scripts | |
ref: main | |
token: ${{ secrets.WORKFLOW_TOKEN }} | |
persist-credentials: true | |
path: 'hf-scripts' | |
clean: true | |
fetch-depth: 0 | |
lfs: false | |
submodules: true | |
set-safe-directory: true | |
github-server-url: 'https://github.com' | |
- name: Clone from Hugging Face | |
env: | |
github_token: ${{ secrets.WORKFLOW_TOKEN }} | |
run: | | |
export GIT_CLONE_PROTECTION_ACTIVE=false | |
git clone https://huggingface.co/Anthonyg5005/hf-scripts mirror | |
cd mirror | |
# 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 | |