diff --git a/.github/workflows/deploy-google.yaml b/.github/workflows/deploy-google.yaml new file mode 100644 index 0000000..340b088 --- /dev/null +++ b/.github/workflows/deploy-google.yaml @@ -0,0 +1,29 @@ +name: Deploy to Google Cloud + +on: + push: + branches: [main] + tags: [v*] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Google Cloud CLI + uses: google-github-actions/setup-gcloud@v0 + with: + project_id: eth-cloud-mb + service_account_key: ${{ secrets.GCP_CREDENTIALS }} + export_default_credentials: true + + - name: Build and Push Docker Image + run: | + IMAGE_NAME=gcr.io/eth-cloud-mb/arak:latest + DOCKERFILE_PATH=docker/Dockerfile + + docker build -t $IMAGE_NAME -f $DOCKERFILE_PATH . + docker push $IMAGE_NAME