Coder Social home page Coder Social logo

animmouse / setup-rclone Goto Github PK

View Code? Open in Web Editor NEW
28.0 4.0 7.0 61 KB

Setup/Install Rclone for GitHub Actions

Home Page: https://github.com/marketplace/actions/setup-rclone-action

License: Mozilla Public License 2.0

Shell 38.52% PowerShell 61.48%
github-actions action rclone google-drive drive actions s3

setup-rclone's Issues

Add optional token input to avoid GitHub API rate limiting on macOS

Since macOS VMs use a few IP addresses, this action sometimes fail on macOS returning null in version variable, failing the download as the IP address got rate limited. actions/runner-images#602

API rate limit exceeded for IP. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
[ERROR] CUID#7 - Download aborted. URI=https://github.com/rclone/rclone/releases/download/null/rclone-null-osx-amd64.zip
Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://github.com/rclone/rclone/releases/download/null/rclone-null-osx-amd64.zip
-> [HttpSkipResponseCommand.cc:219] errorCode=3 Resource not found

Latest version number and proper failure is not guaranteed

One of our workflow run failed with the following error:

[ERROR] CUID#7 - Download aborted. URI=https://github.com/rclone/rclone/releases/download/null/rclone-null-osx-amd64.zip
Exception: [AbstractCommand.cc:351] errorCode=3 URI=https://github.com/rclone/rclone/releases/download/null/rclone-null-osx-amd64.zip
-> [HttpSkipResponseCommand.cc:219] errorCode=3 Resource not found

It seems to be that the error came from here, where for some reason the latest version was determined as null:

version=$(curl -s https://api.github.com/repos/rclone/rclone/releases/latest | jq -r '.tag_name')

Maybe some additional check/retry logic could be implemented in case the version is not properly returned, to make the run more resilient.

This step also didn't fail (which it should have), even though it failed to install the tool. Additional check could be implemented for that too.

Fails with "jq: not found"

Run AnimMouse/setup-rclone@v1
  with:
    rclone_config: ***
Run $GITHUB_ACTION_PATH/scripts/download/Linux.sh
/__w/_actions/AnimMouse/setup-rclone/v1/scripts/download/Linux.sh: 3: jq: not found
Error: Process completed with exit code 127.
  • Job:
runs-on: ubuntu-latest
container: python:3.10
  • Step:
- name: Setup Rclone
   uses: AnimMouse/setup-rclone@v1
   with:
     rclone_config: ${{ secrets.RCLONE_CONFIG }}

Don't force 3rd party dependencies

Hey,

We've noticed your scripts are using aria2c and 7z to download and extract the rclone zip.
This creates a dependency requirements for self-hosted runners that can be avoided.
An additional benefit of removing these dependencies is that your code will run on any windows or linux machine (or at least the majority of them)

Windows

Download

You can do something similar to this:

$ProgressPreference = 'SilentlyContinue'  # hide progress barr
Invoke-WebRequest -Uri "https://....." -OutFile "C:\path\to\aria2c"
$ProgressPreference = 'Continue'  # return progress bar

Unzip

Something like this should work in powershell:

Expand-Archive C:\a.zip -DestinationPath C:\a

Linux

Download

The majority of linux distributions have curl or wget pre-installed.
This is also available in ubuntu and probably is already available in the github cloud runners

Unzip

The majority of linux distributions have unzip installed.
This is also available in ubuntu and probably is already available in the github cloud runners

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.