Skip to content

Commit b9e7bbe

Browse files
committed
Use github action to upload file
1 parent f10032a commit b9e7bbe

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/staging-push.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ jobs:
4646
4747
# Use Github Actions marketplace
4848
- name: Sign in to Google Cloud
49-
id: auth
5049
uses: google-github-actions/auth@v2
5150
with:
5251
credentials_json: ${{ secrets.GCLOUD_AUTH }}
@@ -58,7 +57,10 @@ jobs:
5857
# Connect to GCP bucket
5958
# gcloud auth activate-service-account test-dashboard-cloud-run@moz-mobile-tools.iam.gserviceaccount.com --key-file=/tmp/gce-cloudsql-proxy/key.json --project=moz-mobile-tools
6059
# echo "Hello World!" >> `date +"hello-%Y-%m-%dT%H:%M:%S.txt"`
60+
# gcloud storage cp hello-*.txt gs://backups-testrail-test-suites
6161
- name: Upload file to GCP bucket
62-
run: |
63-
ls hello-*.txt
64-
gcloud storage cp hello-*.txt gs://backups-testrail-test-suites
62+
uses: google-github-actions/upload-cloud-storage@v2
63+
with:
64+
path: hello-*.txt
65+
destination: backups-testrail-test-suites
66+

testrail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,5 +323,5 @@ def report_test_runs_insert(self, project_id, payload):
323323
current = datetime.now().strftime("%Y-%m-%dT%H:%M:%S")
324324
output_filename = "hello-{timestamp}.txt".format(timestamp = current)
325325
output_file = open(output_filename, "w")
326-
output_file.write(str(response))
326+
output_file.write(str(response)) # Not a csv yet
327327
output_file.close()

0 commit comments

Comments
 (0)