ci: critically escalate memory to 8GB and scale execution timeouts #10
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 | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Authenticate to Google Cloud | |
| id: auth | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | |
| - name: Deploy Analyzer to Cloud Run | |
| id: deploy-analyzer | |
| uses: google-github-actions/deploy-cloudrun@v2 | |
| with: | |
| service: apk-analyzer-service | |
| region: us-central1 | |
| source: ./analyzer | |
| flags: '--allow-unauthenticated --memory=8Gi --cpu=2 --timeout=600' | |
| env_vars: |- | |
| GEMINI_API_KEY=${{ secrets.GEMINI_API_KEY }} | |
| - name: Deploy Frontend to Cloud Run | |
| id: deploy-frontend | |
| uses: google-github-actions/deploy-cloudrun@v2 | |
| with: | |
| service: cyber-ai-course | |
| region: us-central1 | |
| source: ./ | |
| env_vars: |- | |
| ANALYZER_URL=${{ steps.deploy-analyzer.outputs.url }}/analyze | |
| flags: '--allow-unauthenticated --timeout=600' | |
| - name: Show Output URL | |
| run: | | |
| echo "Analyzer URL - ${{ steps.deploy-analyzer.outputs.url }}" | |
| echo "Frontend URL - ${{ steps.deploy-frontend.outputs.url }}" |