diff --git a/action.yml b/action.yml index 904d857..ac2f7d4 100644 --- a/action.yml +++ b/action.yml @@ -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 }} diff --git a/entrypoint.sh b/entrypoint.sh index 2067604..0cbbe08 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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