Update Dockerfile #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Cloud Run | |
| on: | |
| push: | |
| branches: | |
| - main | |
| release: | |
| types: [published] | |
| env: | |
| PROJECT_ID: sawasdee-189716 | |
| SERVICE_NAME: rmcp-server | |
| REGION: us-central1 | |
| AR_REGION: us-central1 | |
| AR_REPO: rmcp-repo | |
| GHCR_IMAGE: ghcr.io/finite-sample/rmcp/rmcp-ci:production-latest | |
| AR_IMAGE: us-central1-docker.pkg.dev/sawasdee-189716/rmcp-repo/rmcp-server:latest | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Authenticate to Google Cloud | |
| 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: Configure Docker for Artifact Registry | |
| run: | | |
| gcloud auth configure-docker $AR_REGION-docker.pkg.dev | |
| - name: Pull image from GitHub Container Registry | |
| run: | | |
| docker pull $GHCR_IMAGE | |
| - name: Tag and push to Artifact Registry | |
| run: | | |
| docker tag $GHCR_IMAGE $AR_IMAGE | |
| docker push $AR_IMAGE | |
| - name: Deploy to Cloud Run | |
| run: | | |
| gcloud run deploy $SERVICE_NAME \ | |
| --image $AR_IMAGE \ | |
| --region $REGION \ | |
| --platform managed \ | |
| --allow-unauthenticated \ | |
| --command rmcp \ | |
| --args serve-http,--host,0.0.0.0,--port,8080 \ | |
| --port 8080 \ | |
| --memory 2Gi \ | |
| --timeout 300 |