File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,12 @@ jobs:
105105
106106 - name : Extract version from tag
107107 id : version
108- run : echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
108+ run : |
109+ RAW_TAG="${GITHUB_REF#refs/tags/}"
110+ # Cloud Run traffic tags: lowercase, a-z0-9-, max 63 chars, no leading/trailing -
111+ TRAFFIC_TAG=$(echo "$RAW_TAG" | tr '.' '-' | tr '[:upper:]' '[:lower:]')
112+ echo "tag=$RAW_TAG" >> $GITHUB_OUTPUT
113+ echo "traffic_tag=$TRAFFIC_TAG" >> $GITHUB_OUTPUT
109114
110115 - name : Authenticate to Google Cloud
111116 uses : google-github-actions/auth@v2
@@ -125,7 +130,7 @@ jobs:
125130 --allow-unauthenticated \
126131 --set-env-vars="^|^CONFIG_REPO_OWNER=grove-platform|CONFIG_REPO_NAME=github-copier|CONFIG_REPO_BRANCH=main|PEM_NAME=CODE_COPIER_PEM|WEBHOOK_SECRET_NAME=webhook-secret|MONGO_URI_SECRET_NAME=mongo-uri|WEBSERVER_PATH=/events|MAIN_CONFIG_FILE=.copier/main.yaml|USE_MAIN_CONFIG=true|DEPRECATION_FILE=deprecated_examples.json|COMMITTER_NAME=GitHub Copier App|COMMITTER_EMAIL=bot@mongodb.com|GOOGLE_CLOUD_PROJECT_ID=github-copy-code-examples|COPIER_LOG_NAME=code-copier-log|AUDIT_ENABLED=false|METRICS_ENABLED=true|GITHUB_APP_ID=${{ secrets.GITHUB_APP_ID }}|INSTALLATION_ID=${{ secrets.INSTALLATION_ID }}" \
127132 --set-build-env-vars="VERSION=${{ steps.version.outputs.tag }}" \
128- --tag="${{ steps.version.outputs.tag }}" \
133+ --tag="${{ steps.version.outputs.traffic_tag }}" \
129134 --max-instances=10 \
130135 --cpu=1 \
131136 --memory=512Mi \
You can’t perform that action at this time.
0 commit comments