Skip to content

Manually upload to GCS #10

Manually upload to GCS

Manually upload to GCS #10

name: Upload to GCS Bucket
on:
push:
branches:
- main
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
- name: "Debug logging"
run: |
echo "hello world"
echo "want to upload to gs://ocho-osai/store.json"
cat ./gcs/store.json
- name: List objects in bucket
run: gsutil ls gs://ocho-osai/
# - name: Upload to GCS
# uses: google-github-actions/upload-cloud-storage@v1
# with:
# path: ./gcs/store.json
# destination: gs://ocho-osai/store.json
- name: Manually remove from GCS
run: gsutil rm gs://ocho-osai/store.json
- name: Manually upload to GCS
run: gsutil cp ./gcs/store.json gs://ocho-osai/store.json