-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
497169f
commit a73187e
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Dropbox | ||
|
||
This action can be used in the following manner: | ||
|
||
```yaml | ||
jobs: | ||
chktex: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: paddyroddy/.github/actions/[email protected] | ||
with: | ||
files-to-upload: "example.pdf" | ||
``` | ||
where `x.y.z` is the `major.minor.patch` version of the action. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Dropbox | ||
description: Upload files to Dropbox | ||
|
||
inputs: | ||
files-to-upload: | ||
description: A list of files to upload to dropbox | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: checkout source | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Dropbox | ||
run: | | ||
echo "CONFIGFILE_VERSION=$CONFIGFILE_VERSION" > ~/.dropbox_uploader | ||
echo "OAUTH_APP_KEY=$OAUTH_APP_KEY" >> ~/.dropbox_uploader | ||
echo "OAUTH_APP_SECRET=$OAUTH_APP_SECRET" >> ~/.dropbox_uploader | ||
echo "OAUTH_REFRESH_TOKEN=$OAUTH_REFRESH_TOKEN" >> ~/.dropbox_uploader | ||
env: | ||
CONFIGFILE_VERSION: ${{secrets.CONFIGFILE_VERSION}} | ||
OAUTH_APP_KEY: ${{secrets.OAUTH_APP_KEY}} | ||
OAUTH_APP_SECRET: ${{secrets.OAUTH_APP_SECRET}} | ||
OAUTH_REFRESH_TOKEN: ${{secrets.OAUTH_REFRESH_TOKEN}} | ||
|
||
- name: Retrieve Dropbox uploader script | ||
run: | | ||
curl "https://raw.githubusercontent.com/andreafabrizi/\ | ||
Dropbox-Uploader/master/dropbox_uploader.sh" \ | ||
-o dropbox_uploader.sh | ||
chmod +x dropbox_uploader.sh | ||
- name: Upload PDF | ||
run: | | ||
for file in ${{ inputs.files-to-upload }}; do \ | ||
echo $file; \ | ||
./dropbox_uploader.sh upload $file $file; \ | ||
done |