andreafabrizi / Dropbox-Uploader

Dropbox Uploader is a BASH script which can be used to upload, download, list or delete files from Dropbox, an online file sharing, synchronization and backup service.
https://www.andreafabrizi.it/2016/01/01/Dropbox-Uploader/
GNU General Public License v3.0
6.56k stars 1.08k forks source link

POC: Continues Integration for dropbox_uploaded #558

Closed penchef closed 1 year ago

penchef commented 2 years ago

Hi @andreafabrizi !

I came across your dropbox_uploader after all other options (dropbox's limus client and dbxcli) didn't work for me.

The main problem was that I needed to upload folders in my GitHub Action workflows and the other options didn't let me manage the secrets easily.

I'm using dropbox_uploader in our automated tests and since I've all this working now, I thought you may like to use some of it for your own automated testing of dropbox_uploader.

===

PR adds ci.yml github actions workflow (see https://docs.github.com/en/actions)

The tests run on every git push to the master branch and on every PR into the master branch:

Screen Shot 2021-12-01 at 4 11 44 PM

The workflow assumes that the repository has access to these GitHub secrets: DROPBOX_OAUTH_APP_KEY, DROPBOX_OAUTH_APP_SECRET, DROPBOX_OAUTH_REFRESH_TOKEN

      # The CI needs these three secrets set up on the repository  
      # see https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository
      OAUTH_APP_KEY: ${{ secrets.DROPBOX_OAUTH_APP_KEY }}
      OAUTH_APP_SECRET: ${{ secrets.DROPBOX_OAUTH_APP_SECRET }}
      OAUTH_REFRESH_TOKEN: ${{ secrets.DROPBOX_OAUTH_REFRESH_TOKEN }}

I have made them temporally available my Dropbox_Uploader fork, but revoked access after my PR passed (so you cannot rerun the workflow anymore, it will fail)

Successful workflow run: https://github.com/livelyhood/Dropbox-Uploader/actions/runs/1527759907?check_suite_focus=true

Comments by the CI on the PR:

https://github.com/livelyhood/Dropbox-Uploader/pull/1

Failed workflow run: https://github.com/livelyhood/Dropbox-Uploader/runs/4387211689?check_suite_focus=true

Thanks for your tool!

Best Sebastian (penchef)