diff --git a/.github/workflows/upload-to-gcs-bucket.yml b/.github/workflows/upload-to-gcs-bucket.yml new file mode 100644 index 0000000..dc5e84f --- /dev/null +++ b/.github/workflows/upload-to-gcs-bucket.yml @@ -0,0 +1,34 @@ +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 "${{ secrets.GCP_GCS_BUCKET_NAME }}" + + - name: Upload to GCS + uses: google-github-actions/upload-cloud-storage@v1 + with: + credentials: ${{ secrets.GCP_SA_KEY }} + path: ./gcs/store.json + destination: ${{ secrets.GCP_GCS_BUCKET_NAME }}/store.json diff --git a/gcs/store.json b/gcs/store.json new file mode 100644 index 0000000..0c6f279 --- /dev/null +++ b/gcs/store.json @@ -0,0 +1,3 @@ +{ + "this is a": "test" +}