Skip to content

Download Google Drive File #33

Download Google Drive File

Download Google Drive File #33

Workflow file for this run

name: 'Download Google Drive File'
env:
ARTIFACT_NAME: GoogleDriveFile
on:
workflow_dispatch:
inputs:
tags:
description: "Google AppScript Trigger for Deployment"
required: false
type: string
jobs:
download:
name: Install Python and Download File from Google Drive
runs-on: ubuntu-latest
env:
GOOGLE_FILE_ID: ${{ secrets.GOOGLE_FILE_ID }}
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
defaults:
run:
shell: bash
working-directory: ./.github/scripts
outputs:
file-byte-count: ${{steps.verification.outputs.test}}
steps:
- name: Checkout Github repository
uses: actions/checkout@v4
- name: setup Python 3.10+ on runner
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip' # caching pip dependencies
- name: Install Python Dependencies
run: pip install -r requirements.txt
- name: Create credentials file for Google
run: |
echo $GOOGLE_SERVICE_ACCOUNT > services_encoded.json
wc -c services_encoded.json
cat services_encoded.json | base64 -di > services.json
wc -c services.json
- name: Download file from Google Drive
run: python3 ./GoogleDriveFileDownloader.py
- id: verification
name: Return the byte count of the file downloaded
run: wc -c index.html
- name: Cache the file - to be used in deployment workflow
uses: actions/upload-artifact@v4
with:
name: $ARTIFACT_NAME
path: ./index.html
retention-days: 9
overwrite: true
- name: cleanup - ensure credentials removed from runner
run: |
rm -f services.json
rm -f services_decoded.json
if: ${{ always() }}
trigger-deployment:

Check failure on line 72 in .github/workflows/download.yaml

View workflow run for this annotation

GitHub Actions / Download Google Drive File

Invalid workflow file

The workflow is not valid. .github/workflows/download.yaml (Line: 72, Col: 3): Error calling workflow 'teracross/webhosting/.github/workflows/deploy.yaml@6a61cc4fe88a075781176be9d5492af5119b45bb'. The workflow is requesting 'id-token: write', but is only allowed 'id-token: none'.
uses: ./.github/workflows/deploy.yaml
needs: download
with:
artifact-name: $ARTIFACT_NAME
if: ${{ needs.download.outputs.file-byte-count > 1 }}