From c15acaf9112b7a77c71ca3563dcc9fa80117826a Mon Sep 17 00:00:00 2001 From: faycal Date: Sat, 22 Mar 2025 16:09:21 +0100 Subject: [PATCH] wip --- .github/workflows/deploy-function.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy-function.yml b/.github/workflows/deploy-function.yml index 5ba19f6..b0bdec6 100644 --- a/.github/workflows/deploy-function.yml +++ b/.github/workflows/deploy-function.yml @@ -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 \ No newline at end of file + uses: google-github-actions/upload-cloud-storage@v2 + with: + path: function/music.mp3 + destination: ${{ vars.GCP_BUCKET_NAME }} + parent: false \ No newline at end of file