Github Action To Upload Artifacts to Google Drive Using A Google Drive Api.
steps:
- uses: actions/checkout@v4.1.1
- name: Upload Artifacts TO Google Drive
uses: Jumbo810/Upload_Github_Artifacts_TO_GDrive@v2.2.2
with:
target: <LOCAL_PATH_TO_YOUR_FILE>
credentials: ${{ secrets.<YOUR_SERVICE_ACCOUNT_CREDENTIALS> }}
parent_folder_id: <YOUR_DRIVE_FOLDER_ID>
Local path to the file to upload, can be relative from github runner current directory.
A service account public/private key pair encoded in base64.
Generate and download your credentials in JSON format
Run base64 my_service_account_key.json > encoded.txt
and paste the encoded string into a github secret.
The id of the drive folder where you want to upload your file. It is the string of characters after the last /
when browsing to your folder URL. You must share the folder with the service account (using its email address) unless you specify a owner
.
The name of the file to be uploaded. Set to the target
filename if not specified.
A sub-folder where to upload your file. It will be created if non-existent and must remain unique. Useful to organize your drive like so:
π Release // parent folder
β
β£ π v1.0 // child folder
β β π uploaded_file_v1.0
β
β£ π v2.0 // child folder
β β π uploaded_file_v2.0
The email address of a user account that has access to the drive folder and will get the ownership of the file after its creation. To use this feature you must grant your service account a domain-wide delegation of authority beforehand.
If set true, delete files with the same name before uploading.