Skip to content
upload-cloud

GitHub Action

GitHub Actions for Dropbox

v0.0.1 Latest version

GitHub Actions for Dropbox

upload-cloud

GitHub Actions for Dropbox

πŸ“¦ Collection of GitHub Actions for Dropbox API. (Upload, Download .zip)

Installation

Copy and paste the following snippet into your .yml file.

              

- name: GitHub Actions for Dropbox

uses: gomes42/gh-actions-dropbox@v0.0.1

Learn more about this action in gomes42/gh-actions-dropbox

Choose a version

πŸ“¦ Collection of GitHub Actions for Dropbox (gh-actions-dropbox)

Easily integrate Dropbox into your CI/CD pipelines with GitHub Actions for Dropbox. This tool simplifies interactions with the Dropbox API, enabling file management within your automated workflows. By incorporating Dropbox functionalities into your pipeline, you can streamline tasks such as backups, file transfers, and data synchronization, enhancing the efficiency and reliability of your development processes.

πŸš€ Available Actions

  • File Upload
  • Download file
  • Download folder as .zip
  • Move file/folder

See Examples Usage

βš™οΈ Configuration

  1. Create your app on Dropbox Developers.

  2. Set Required Permissions:

    Action πŸš€ Permissions 🚦
    files/upload files.content.write
    files/download files.content.read
    files/download_zip files.content.read
    files/move files.content.write
  3. Generate an Access Token and Refresh Token:
    Follow This Guide.

  4. Create secrets to your repository:
    Settings > Secrets and variables > Actions > Secrets > New repository secret

DROPBOX_APP_KEY = ##################
DROPBOX_APP_SECRET = ##################
DROPBOX_REFRESH_TOKEN = ##################

πŸ“ Examples Usage

Upload a file to Dropbox πŸ“€
jobs:
  my-example-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout πŸ””
        uses: actions/checkout@v4

      - name: Dropbox Upload πŸ“¦
        uses: gomes42/gh-actions-dropbox/files/upload@2
        with:
          DROPBOX_APP_KEY: ${{ secrets.DROPBOX_APP_KEY }}
          DROPBOX_APP_SECRET: ${{ secrets.DROPBOX_APP_SECRET }}
          DROPBOX_REFRESH_TOKEN: ${{ secrets.DROPBOX_REFRESH_TOKEN }}
          SOURCE_PATH: OriginalFile.txt
          DEST_PATH: /MyFiles/File.txt

          # SOURCE_PATH:
          #   Path to file to upload
          #   (in container)

          # DEST_PATH:
          #   Destination file path
          #   (relative to root of Dropbox account)
Download a file from Dropbox πŸ“©
jobs:
  my-example-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout πŸ””
        uses: actions/checkout@v4

      - name: Dropbox Download file πŸ“¦
        uses: gomes42/gh-actions-dropbox/files/download@2
        with:
          DROPBOX_APP_KEY: ${{ secrets.DROPBOX_APP_KEY }}
          DROPBOX_APP_SECRET: ${{ secrets.DROPBOX_APP_SECRET }}
          DROPBOX_REFRESH_TOKEN: ${{ secrets.DROPBOX_REFRESH_TOKEN }}
          SOURCE_PATH: /MyFiles/MyFolder/MyFile.txt
          DEST_PATH: MyFile.txt

          # SOURCE_PATH:
          #   Path to a file to download
          #   (relative to root of Dropbox account)

          # DEST_PATH:
          #   Destination file path
          #   (in container)
Download a folder as .zip from Dropbox πŸ“
jobs:
  my-example-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout πŸ””
        uses: actions/checkout@v4

      - name: Dropbox Download (.zip) πŸ“¦
        uses: gomes42/gh-actions-dropbox/files/download_zip@2
        with:
          DROPBOX_APP_KEY: ${{ secrets.DROPBOX_APP_KEY }}
          DROPBOX_APP_SECRET: ${{ secrets.DROPBOX_APP_SECRET }}
          DROPBOX_REFRESH_TOKEN: ${{ secrets.DROPBOX_REFRESH_TOKEN }}
          SOURCE_PATH: /MyFiles/MyFolder
          DEST_PATH: MyFolder.zip

          # SOURCE_PATH:
          #   Path to a folder to download as .zip
          #   (relative to root of Dropbox account)

          # DEST_PATH:
          #   Destination .zip file path
          #   (in container)
Move a file or folder on Dropbox πŸ”€
jobs:
  my-example-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout πŸ””
        uses: actions/checkout@v4

      - name: Dropbox Move πŸ“¦
        uses: gomes42/gh-actions-dropbox/files/move@2
        with:
          DROPBOX_APP_KEY: ${{ secrets.DROPBOX_APP_KEY }}
          DROPBOX_APP_SECRET: ${{ secrets.DROPBOX_APP_SECRET }}
          DROPBOX_REFRESH_TOKEN: ${{ secrets.DROPBOX_REFRESH_TOKEN }}
          SOURCE_PATH: /MyFiles/File.txt
          DEST_PATH: /MyFiles/MoveInHere/File.txt

          # SOURCE_PATH:
          #   Path to a file or folder
          #   (relative to root of Dropbox account)

          # DEST_PATH:
          #   Path to the new location
          #   (relative to root of Dropbox account)

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request or open an issue.

πŸ“œ License

The scripts and documentation in this project are released under the MIT License.