Skip to content

This GitHub Action clones a specified git repository, packages it into a tar file, and uploads the tar file as an artifact for download.此 GitHub 操作克隆指定的 git 仓库,将其打包为 tar 文件,并将 tar 文件作为可下载的压缩包上传。

Notifications You must be signed in to change notification settings

AlexMa2011/Clone-and-Package-HF-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Clone and Package Hugging Face Model GitHub Action / 克隆和打包Hugging Face模型的GitHub Action 

This GitHub Action clones a specified git repository, packages it into a tar file, and uploads the tar file as an artifact for download. 

此GitHub Action会克隆指定的git仓库,将其打包成tar文件,并将生成的tar文件作为可供下载的压缩包上传。

Usage / 使用方法

To use this action, you need to fork this repository or add a workflow file to your repository. The workflow file should be located at .github/workflows/clone_and_package.yml

要使用此action,你需要fork这个存储库或者在你的存储库中添加一个工作流文件,该工作流应位于.github/workflows

workflow

name: Clone and Package Model

on:
  workflow_dispatch:
    inputs:
      git_url:
        description: 'Git URL to clone'
        required: true

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2

    - name: Install git-lfs
      run: |
        sudo apt-get install -y git-lfs
        git lfs install

    - name: Clone Hugging Face model
      run: |
        git clone ${{ github.event.inputs.git_url }} model
        tar -czvf model.tar.gz model

    - name: Upload tar file as artifact
      uses: actions/upload-artifact@v2
      with:
        name: model-tar
        path: model.tar.gz

About

This GitHub Action clones a specified git repository, packages it into a tar file, and uploads the tar file as an artifact for download.此 GitHub 操作克隆指定的 git 仓库,将其打包为 tar 文件,并将 tar 文件作为可下载的压缩包上传。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published