Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ Deploy CUDly to GCP Cloud Run. Serverless container platform.
### Required Secrets

- `GCP_SA_KEY` (Service Account JSON with permissions)
- `GCP_PROJECT_ID`

### Required Variables

- `GCP_PROJECT_ID`
- `GCP_REGION` (default: us-central1)
- `ARTIFACT_REGISTRY_REPO` (default: cudly)

Expand Down Expand Up @@ -464,8 +464,10 @@ gcloud iam service-accounts keys create key.json \

# Set secrets
gh secret set GCP_SA_KEY < key.json
gh secret set GCP_PROJECT_ID -b"<project-id>"
gh secret set DB_PASSWORD_GCP

# Set variables
gh variable set GCP_PROJECT_ID --body "<project-id>"
```

**Azure:**
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/rollback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
# Required GitHub Secrets:
# - Same as deployment workflows (AWS, GCP, Azure credentials)
#
# Required GitHub Variables:
# - GCP_PROJECT_ID (GCP rollback; same variable deploy-gcp.yml reads)
#
# Triggered by:
# - Manual workflow dispatch only (safety measure)

Expand Down Expand Up @@ -103,7 +106,7 @@ jobs:
AWS_ACCOUNT_ID: ${{ vars.AWS_ACCOUNT_ID }}
AWS_REGION: ${{ vars.AWS_REGION || 'us-east-1' }}
GCP_REGION: ${{ vars.GCP_REGION || 'us-central1' }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }}
ARTIFACT_REGISTRY_REPO: ${{ vars.ARTIFACT_REGISTRY_REPO || 'cudly' }}
ACR_NAME: ${{ vars.ACR_NAME || 'cudlyacr' }}
run: |
Expand Down Expand Up @@ -141,7 +144,7 @@ jobs:
;;
gcp)
if [ -z "$GCP_PROJECT_ID" ]; then
echo "::error::GCP_PROJECT_ID secret is not set; refusing to guess the project"
echo "::error::GCP_PROJECT_ID variable is not set; refusing to guess the project"
exit 1
fi
IMAGE_URI="${GCP_REGION}-docker.pkg.dev/${GCP_PROJECT_ID}/${ARTIFACT_REGISTRY_REPO}/cudly:${IMAGE_TAG}"
Expand Down Expand Up @@ -447,7 +450,7 @@ jobs:
TF_BACKEND: ${{ secrets.TF_BACKEND_GCP }}
ENVIRONMENT: ${{ inputs.environment }}
IMAGE_URI: ${{ needs.validate.outputs.image_uri }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }}
run: |
set -euo pipefail
printf '%s\nprefix = "github-%s"\n' "$TF_BACKEND" "$ENVIRONMENT" > /tmp/backend.tfbackend
Expand Down
Loading