# /cloud-run-basics: Deploy services, jobs and worker pools to Cloud Run

Source: https://trendhub.net/skills/google-skills/cloud-run-basics
Skill folder: https://github.com/google/skills/tree/main/skills/cloud/cloud-run-basics
Pack: Google Agent Skills (https://trendhub.net/skills/google-skills)
Works with: Any agent supported by the skills CLI, Claude Code (plugins), Codex (plugins), Antigravity CLI

cloud-run-basics covers Cloud Run's three resource types: HTTP services that autoscale, jobs that run tasks to completion, and always-on worker pools for pull-based queues. It lists the APIs and roles a deploy needs, shows deploys from a container image or straight from source, explains job task and retry options, and gives a short path for diagnosing failed deployments.

## When to use it

- You want to put a web app or API on Cloud Run from source without writing a Dockerfile.
- You need a scheduled or parallel batch task that runs to completion.
- You run a Kafka or Pub/Sub pull consumer that must stay up.

## How it works

1. **Prepare the project**: The agent enables the Cloud Run and Cloud Build APIs and checks the deploying identity and build service account have the listed roles.
2. **Pick the resource type**: It maps the workload to a service, a job or a worker pool based on whether it serves requests, finishes, or pulls work continuously.
3. **Deploy image or source**: It deploys an Artifact Registry image or builds from source with buildpacks or a Dockerfile, making sure the app listens on 0.0.0.0 and $PORT.
4. **Configure jobs**: For jobs it sets task count, retries, timeout and parallelism, and can start an execution immediately or wait for it to finish.
5. **Debug failures**: On a failed deploy it checks IAM guidance, reads recent service logs for boot errors, and switches to a buildpack build for native dependencies.

## What it steers the agent away from

- Containers that bind to 127.0.0.1 or a fixed port and crash on start.
- Relying on Docker Hub images that are only cached for a limited time.
- Guessing at boot failures without reading the service logs.

## What it can touch

It runs gcloud run and logging commands in your project, builds and deploys containers, and may add IAM bindings for the build service account.

## Pairs well with

- `/gcloud`
- `/cloud-build-basics`
- `/cloud-run-alert-configuration`

## Questions

### Can I deploy without Cloud Build?

Yes. A preview option deploys source directly onto a runtime base image without a build step, though native extensions may need the buildpack route.

### How long can a Cloud Run job task run?

The skill gives a default of 10 minutes and a maximum of 168 hours, or 1 hour for tasks that use GPUs.
