This commit is contained in:
faycal 2025-03-22 16:09:21 +01:00
parent a7959580ff
commit c15acaf911

View File

@ -27,7 +27,7 @@ jobs:
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Deploy Google Cloud Function
run: |
@ -36,10 +36,12 @@ jobs:
--trigger-http \
--entry-point main \
--source function \
--region "${{ secrets.GCP_REGION }}" \
--region ${{ secrets.GCP_REGION }} \
--set-env-vars API_URL="${{ secrets.API_URL }}",VIDEO_SUBJECT="${{ vars.VIDEO_SUBJECT }}",VIDEO_DESCRIPTION="${{ vars.VIDEO_DESCRIPTION }}",ACCOUNT_NAME="${{ vars.ACCOUNT_NAME }}",TIME_BEFORE_DOWNLOAD="${{ vars.TIME_BEFORE_DOWNLOAD }}"
- name: Upload music.mp3 to Google Cloud Storage
run: |
gcloud auth activate-service-account --key-file="${{ secrets.GCP_SA_KEY }}"
gsutil cp function/music.mp3 gs://"${{ vars.GCP_BUCKET_NAME }}"/music.mp3
uses: google-github-actions/upload-cloud-storage@v2
with:
path: function/music.mp3
destination: ${{ vars.GCP_BUCKET_NAME }}
parent: false