Anthonyg5005
commited on
Commit
•
5857c7f
1
Parent(s):
13e2d3f
Add github mirror - hourly update
Browse filesMirror huggingfac repo to [github](https://github.com/Anthonyg5005/hf-scripts)
- .github/workflows/main.yml +26 -0
.github/workflows/main.yml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Clone from Hugging Face
|
2 |
+
on:
|
3 |
+
schedule:
|
4 |
+
- cron: '0 * * * *' # <-- run every hour at the start of the hour
|
5 |
+
workflow_dispatch:
|
6 |
+
jobs:
|
7 |
+
clone:
|
8 |
+
runs-on: ubuntu-latest
|
9 |
+
steps:
|
10 |
+
- uses: actions/checkout@v3
|
11 |
+
with:
|
12 |
+
fetch-depth: 0
|
13 |
+
lfs: true
|
14 |
+
- name: Clone from Hugging Face
|
15 |
+
env:
|
16 |
+
HF_TOKEN: ${{ secrets.HF_ACCESS_TOKEN }}
|
17 |
+
github_token: ${{ secrets.WORKFLOW_TOKEN }}
|
18 |
+
run: |
|
19 |
+
git clone https://Anthonyg5005:$HF_TOKEN@huggingface.co/Anthonyg5005/hf-scripts
|
20 |
+
cd hf-scripts
|
21 |
+
|
22 |
+
# Now, push to the original GitHub repository with username and token
|
23 |
+
git remote set-url origin https://Anthonyg5005:${{ secrets.WORKFLOW_TOKEN }}@github.com/Anthonyg5005/hf-scripts.git
|
24 |
+
git push --mirror
|
25 |
+
|
26 |
+
#AI Generated code, don't know how to use gh actions
|