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.
File Upload
Download file
Download folder as .zip
Move file/folder
See Examples Usage
-
Create your app on Dropbox Developers.
-
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
-
Generate an Access Token and Refresh Token:
Follow This Guide. -
Create secrets to your repository:
Settings > Secrets and variables > Actions > Secrets > New repository secret
DROPBOX_APP_KEY = ##################
DROPBOX_APP_SECRET = ##################
DROPBOX_REFRESH_TOKEN = ##################
Upload a 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 file from Dropbox 📩
jobs:
my-example-job:
runs-on: ubuntu-latest
steps:
- name: Checkout 🔔
uses: actions/checkout@v4
- name: Dropbox Download file 📦
uses: lgxm3z/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: 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)
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: lgxm3z/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)
Contributions are welcome! Please feel free to submit a Pull Request or open an issue.
The scripts and documentation in this project are released under the MIT License.