File size: 1,129 Bytes
5857c7f
 
 
9fd4758
5857c7f
 
 
 
 
5e17b4b
 
5857c7f
5e17b4b
 
 
 
 
 
5857c7f
5e17b4b
 
 
 
5857c7f
 
 
 
 
5e17b4b
 
5857c7f
 
 
 
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
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:
          HF_TOKEN: ${{ secrets.HF_ACCESS_TOKEN }}
          github_token: ${{ secrets.WORKFLOW_TOKEN }}
        run: |
          git clone https://Anthonyg5005:[email protected]/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