Skip to content

Commit

Permalink
Merge pull request #1 from satackey/custom-api-key
Browse files Browse the repository at this point in the history
Custom API key & Dockerhub
  • Loading branch information
satackey authored Dec 30, 2019
2 parents 7ef7ae7 + 63d888b commit 662fa5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ inputs:


runs:
using: 'docker'
image: 'Dockerfile'
using: docker
image: docker://satackey/action-google-drive:v1.1.0
env:
SKICKA_TOKENCACHE_JSON: ${{ inputs.skicka-tokencache-json }}
UPLOAD_FROM: ${{ inputs.upload-from }}
Expand Down
9 changes: 6 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

set -eu

# skicka init
if [ ! -e ~/.skicka.config ]; then
skicka init
fi

echo $SKICKA_TOKENCACHE_JSON > $HOME/.skicka.tokencache.json

if [ -n "$GOOGLE_CLIENT_ID" ]; then
sed -i -e "s/;clientid=YOUR_GOOGLE_APP_CLIENT_ID/clientid=$GOOGLE_CLIENT_ID/" ~/.skicka.config
sed -i -e "s/;clientsecret=YOUR_GOOGLE_APP_SECRET/clientid=$GOOGLE_CLIENT_SECRET/" ~/.skicka.config
sed -i -e "s/;clientsecret=YOUR_GOOGLE_APP_SECRET/clientsecret=$GOOGLE_CLIENT_SECRET/" ~/.skicka.config
fi

skicka upload -no-browser-auth -ignore-times "$UPLOAD_FROM" "$UPLOAD_TO"
skicka -no-browser-auth upload -ignore-times "$UPLOAD_FROM" "$UPLOAD_TO"

# Remove outdated
if [ $REMOVE_OUTDATED == "true" ]; then
Expand Down

0 comments on commit 662fa5a

Please sign in to comment.