alpha.13 #14
Workflow file for this run
This file contains 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: Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
deploy-image-to: | |
name: "Deploy Shared Instance to CloudRun" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: GCP Workload Identity Auth | |
id: auth | |
uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: projects/791837997629/locations/global/workloadIdentityPools/github-actions-pool/providers/gha-id-pool-provider | |
service_account: [email protected] | |
# - name: "Auth to AR" | |
# run: gcloud auth configure-docker us-east4-docker.pkg.dev | |
# | |
# - name: "Build Docker Image" | |
# run: | | |
# docker build . \ | |
# -f Dockerfile \ | |
# -t us-east4-docker.pkg.dev/surface-420608/stable/synchro-kotlin:${GITHUB_SHA::6} \ | |
# -t us-east4-docker.pkg.dev/surface-420608/stable/synchro-kotlin:latest | |
# | |
# - name: "Push Docker Image to AR" | |
# run: | | |
# docker push us-east4-docker.pkg.dev/surface-420608/stable/synchro-kotlin:${GITHUB_SHA::6} | |
# docker push us-east4-docker.pkg.dev/surface-420608/stable/synchro-kotlin:latest | |
# - name: "gcloud run deploy (single deploy multi container)" | |
# run: | | |
# echo "PROD: 'true'" >> .env.yaml | |
# echo "LOG_LEVEL: 'info'" >> .env.yaml | |
# echo "ENABLE_TOKEN_ENDPOINT: 'true'" >> .env.yaml | |
# echo "STABLE_DB_MAX_CONNECTIONS: '10'" >> .env.yaml | |
# echo "HTTP_PORT: '8001'" >> .env.yaml | |
# echo "GRPC_PORT: '50051'" >> .env.yaml | |
# echo "PGSSLROOTCERT: '/etc/ssl/certs/ca-certificates.crt'" >> .env.yaml | |
# | |
# gcloud run deploy synchro-kotlin-shared \ | |
# --service-account [email protected] \ | |
# --region us-east4 \ | |
# --allow-unauthenticated \ | |
# --container nginx \ | |
# --image us-east4-docker.pkg.dev/surface-420608/stable/synchro-nginx:latest \ | |
# --port 8080 \ | |
# --use-http2 \ | |
# --container synchro \ | |
# --image us-east4-docker.pkg.dev/surface-420608/stable/synchro-kotlin:latest \ | |
# --update-secrets JWT_SECRET=JWT_SECRET:latest,ABLY_API_KEY=ABLY_API_KEY:latest,NEON_FULL_JDBC_URL=NEON_FULL_JDBC_URL:latest \ | |
# --env-vars-file .env.yaml | |
- name: "gcloud run deploy (synchro)" | |
run: | | |
echo "PROD: 'true'" >> .env.yaml | |
echo "LOG_LEVEL: 'info'" >> .env.yaml | |
echo "ENABLE_TOKEN_ENDPOINT: 'true'" >> .env.yaml | |
echo "STABLE_DB_MAX_CONNECTIONS: '10'" >> .env.yaml | |
echo "HTTP_PORT: '8080'" >> .env.yaml | |
echo "PGSSLROOTCERT: '/etc/ssl/certs/ca-certificates.crt'" >> .env.yaml | |
gcloud run deploy synchro-kotlin-shared-alpha \ | |
--image us-east4-docker.pkg.dev/surface-420608/stable/synchro-kotlin:latest \ | |
--service-account [email protected] \ | |
--region us-east4 \ | |
--allow-unauthenticated \ | |
--port 8080 \ | |
--update-secrets JWT_SECRET=JWT_SECRET:latest,ABLY_API_KEY=ABLY_API_KEY:latest,NEON_FULL_JDBC_URL=NEON_FULL_JDBC_URL:latest \ | |
--env-vars-file .env.yaml | |