From 58bc5d84073c16fdbff3e98d0a9bba57ecb702d8 Mon Sep 17 00:00:00 2001 From: Bulat Gumerov Date: Tue, 22 Oct 2024 15:31:04 +0700 Subject: [PATCH] fix --- .github/workflows/test-semgrep.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-semgrep.yml b/.github/workflows/test-semgrep.yml index f29c489f..3832f935 100644 --- a/.github/workflows/test-semgrep.yml +++ b/.github/workflows/test-semgrep.yml @@ -56,14 +56,10 @@ jobs: # Upload file directly to GCS gsutil cp semgrep.txt "gs://${GCS_BUCKET}/${FILENAME}" - # Extract JSON key to a file for signurl - echo "${{ secrets.GCP_SA_KEY }}" > key.json - - # Generate signed URL using the key file - SIGNED_URL=$(gsutil signurl -d "${URL_EXPIRATION}" key.json "gs://${GCS_BUCKET}/${FILENAME}" | awk 'NR==2 {print $5}') - - # Clean up key file - rm key.json + # Generate signed URL using gcloud storage + SIGNED_URL=$(gcloud storage sign-url \ + "gs://${GCS_BUCKET}/${FILENAME}" \ + --duration="${URL_EXPIRATION}") echo "url=${SIGNED_URL}" >> $GITHUB_OUTPUT