Skip to content

zhangwj0520/action-qiniu-upload

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Github Action for Uploading Files to Qiniu

GitHub Super-Linter CI Check dist/ CodeQL Coverage

这是上传文件到七牛的Github Action。 🚀

此操作使用 qiniu nodejs sdk 将目录(来自您的存储库或在工作流程中生成)上传到云存储桶。

[!重要] 支持覆盖上传

用法

name: 上传文件到七牛Kodo

on:
  push:
    branches:
    - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      id: checkout
      uses: actions/checkout@v4
  
   - name: 本地测试Action
     id: test-action
     uses: zhangwj0520/action-qiniu-upload@main
     with:
        # Your qiniu access key, required.
        access_key: ${{ secrets.QINIU_ACCESS_KEY }}

        # Your qiniu secret key, required.
        secret_key: ${{ secrets.QINIU_SECRET_KEY }}

        # Bucket name, required.
        bucket: ${{ secrets.QINIU_BUCKET }}

         # 是否覆盖已有文件
        is_cover : true

        # The local directory (or file) you want to upload to bucket.
        # Default: './dist'
        source_dir: './dist'

        # The directory inside of the bucket you want to upload to, namely key prefix prepended to dest file key.
        # Default: '/'
        dest_dir: '/'

        # Whether to ignore source maps.
        # Default: true
        ignore_source_map: true

License

MIT license.