eastack / cowboy

Cowboy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cowboy

Download file to Qiniu Cloud COS

Inputs

  • access_key Qiniu Cloud AccessKey

  • secret_key Qiniu Cloud SecretKey

  • bucket COS Bucket name

  • url Download url

  • key Objects resource name

  • overwrite Overwrite existing object yes/no

Outputs

  • hash Object data hash

  • key Object name

Example usage

Add a GitHub Actions
on: [push]

jobs:
  main:
    runs-on: ubuntu-latest
    name: Download file to Qiniu Cloud COS
    steps:
    - name: Download image to Qiniu Cloud COS
      uses: rwrr/cowboy@v1.1.3
      with:
        access_key: ${{ secrets.ACCESSKEY }}
        secret_key: ${{ secrets.SECRETKEY }}
        url: 'https://upload.wikimedia.org/wikipedia/en/1/19/Role-based_access_control.jpg'
        bucket: 'radix10'
        key: 'rbac.jpg'
        overwrite: 'yes'
Try to download the file
curl -L "https://yourdomain/rbac.jpg?flag=$RANDOM" -o rbac.jpg # (1)
  1. Add a random parameter to avoid CDN cache.

About

Cowboy


Languages

Language:JavaScript 100.0%