Skip to content

πŸ“¦ Collection of GitHub Actions for Dropbox API.

License

Notifications You must be signed in to change notification settings

lgxm3z/gh-actions-dropbox

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“¦ 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 folder as .zip

βš™οΈ Configuration

  1. Create your app on Dropbox Developers.

  2. Set Required Permissions:

    Action πŸš€ Permissions 🚦
    files/upload files.content.write
    files/download_zip files.content.read
  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 file to Dropbox πŸ“€
jobs:
  my-example-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout πŸ””
        uses: actions/checkout@v4

      - name: Dropbox Upload πŸ“¦
        uses: lgxm3z/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 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: lgxm3z/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)

🀝 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.