ci: add HuggingFace mirror on tag release
Some checks failed
Mirror to HuggingFace / mirror (push) Failing after 3s
Some checks failed
Mirror to HuggingFace / mirror (push) Failing after 3s
Pushes to huggingface.co/lthn/LEM-Gemma3-1B on v* tags. Requires HF_TOKEN secret in org/repo settings. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
6a58f09d83
commit
ec36bd2602
1 changed files with 25 additions and 0 deletions
25
.forgejo/workflows/mirror-hf.yml
Normal file
25
.forgejo/workflows/mirror-hf.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
name: Mirror to HuggingFace
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
|
||||
jobs:
|
||||
mirror:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout with LFS
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push to HuggingFace
|
||||
env:
|
||||
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
||||
HF_REPO: ${{ vars.HF_REPO || 'lthn/LEM-Gemma3-1B' }}
|
||||
run: |
|
||||
git remote add hf "https://Virgil:${HF_TOKEN}@huggingface.co/${HF_REPO}"
|
||||
git push hf main --force
|
||||
git push hf --tags
|
||||
echo "Mirrored ${GITHUB_REF_NAME} → huggingface.co/${HF_REPO}"
|
||||
Loading…
Add table
Reference in a new issue