Skip to content

Commit 9dbee61

Browse files
committed
fix: Fix CI
1 parent e714f08 commit 9dbee61

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,29 @@ jobs:
112112
zip -r "$id.zip" .
113113
114114
echo "::notice::Successfully built plugin."
115+
116+
# Step 2: Set up Google Cloud SDK
117+
- name: Install Google Cloud SDK
118+
run: |
119+
sudo apt-get update
120+
sudo apt-get install apt-transport-https ca-certificates gnupg curl
121+
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
122+
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
123+
sudo apt-get update && sudo apt-get install google-cloud-cli
124+
125+
# Step 3: Authenticate with the Service Account
126+
- name: Authenticate to Google Cloud
127+
env:
128+
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
129+
run: |
130+
echo "${GCP_SERVICE_ACCOUNT_KEY}" > gcloud-key.json
131+
gcloud auth activate-service-account --key-file=gcloud-key.json
132+
gcloud config set project [YOUR_PROJECT_ID]
133+
134+
# Step 4: Upload a file to GCS
135+
- name: Upload file to GCS
136+
run: |
137+
echo "This is a test file" > test-file.txt
138+
gsutil cp test-file.txt gs://[YOUR_BUCKET_NAME]/path/in/bucket/
139+
140+

0 commit comments

Comments
 (0)