From 141103e29b3b35e48702785e52af8da30829d14a Mon Sep 17 00:00:00 2001 From: John Shaughnessy Date: Tue, 31 Oct 2023 22:36:26 -0400 Subject: [PATCH] Add upload to gcs bucket workflow --- .github/workflows/upload-to-gcs-bucket.yml | 34 ++++++++++++++++++++++ gcs/store.json | 3 ++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/upload-to-gcs-bucket.yml create mode 100644 gcs/store.json diff --git a/.github/workflows/upload-to-gcs-bucket.yml b/.github/workflows/upload-to-gcs-bucket.yml new file mode 100644 index 0000000..e62dea4 --- /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 }} 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" +}