Skip to content

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

License

Notifications You must be signed in to change notification settings

gomes42/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

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