Skip to content

Commit eed83a8

Browse files
committed
avoid using matrix for now
1 parent 051dab4 commit eed83a8

2 files changed

Lines changed: 7 additions & 15 deletions

File tree

.github/workflows/_cloud-run-cleanup.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ jobs:
1616
cleanup:
1717
runs-on: zondax-runners
1818
environment: ${{ inputs.environment }}
19-
strategy:
20-
matrix:
21-
region:
22-
- ${{ vars.PULUMI_GAR_LOCATION }}
2319
permissions:
2420
id-token: write # Enables automatic ID token injection for google-github-actions/auth
2521
contents: read # Required for actions/checkout and GitHub API access
@@ -54,7 +50,7 @@ jobs:
5450
# Replace PR_NUMBER placeholder if present
5551
sed -i "s#<PR_NUMBER>#${{ github.event.number }}#g" service.temp.yaml
5652
# Replace <REGION> placeholder if present
57-
sed -i "s#<REGION>#${{ matrix.region }}#g" service.temp.yaml
53+
sed -i "s#<REGION>#${{ vars.PULUMI_GAR_LOCATION }}#g" service.temp.yaml
5854
5955
SERVICE_NAME=$(yq '.metadata.name' service.temp.yaml)
6056
echo "service_name=$SERVICE_NAME" >> $GITHUB_OUTPUT
@@ -74,5 +70,5 @@ jobs:
7470
7571
- name: Delete Cloud Run Service (Final Name)
7672
run: |
77-
echo "Deleting Cloud Run service: ${{ steps.set-service-name.outputs.safe_service_name }} in region ${{ matrix.region }}"
78-
gcloud run services delete ${{ steps.set-service-name.outputs.safe_service_name }} --project ${{ vars.PULUMI_GCP_PROJECT_ID }} --region ${{ matrix.region }} --platform managed --quiet || true
73+
echo "Deleting Cloud Run service: ${{ steps.set-service-name.outputs.safe_service_name }} in region ${{ vars.PULUMI_GAR_LOCATION }}"
74+
gcloud run services delete ${{ steps.set-service-name.outputs.safe_service_name }} --project ${{ vars.PULUMI_GCP_PROJECT_ID }} --region ${{ vars.PULUMI_GAR_LOCATION }} --platform managed --quiet || true

.github/workflows/_cloud-run-deploy.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ jobs:
4343
deploy:
4444
runs-on: zondax-runners
4545
environment: ${{ inputs.environment }}
46-
strategy:
47-
matrix:
48-
region:
49-
- ${{ vars.PULUMI_GAR_LOCATION }}
5046
outputs:
5147
url: ${{ steps.get-url.outputs.url }}
5248
permissions:
@@ -57,7 +53,7 @@ jobs:
5753
- name: Environment Logging
5854
run: |
5955
echo "Environment: ${{ inputs.environment }}"
60-
echo "Region: ${{ matrix.region }}"
56+
echo "Region: ${{ vars.PULUMI_GAR_LOCATION }}"
6157
echo "WIF Provider: ${{ vars.PULUMI_DEPLOY_WIF_PROVIDER }}"
6258
echo "Service Account: ${{ vars.PULUMI_SA_CLOUDRUN }}"
6359
echo "GCP Project ID: ${{ vars.PULUMI_GCP_PROJECT_ID }}"
@@ -93,7 +89,7 @@ jobs:
9389
# Replace PR_NUMBER placeholder if present (only for knative.yaml file, not config)
9490
sed -i "s#<PR_NUMBER>#${{ github.event.number }}#g" service.deploy.yaml
9591
# Replace <REGION> placeholder if present
96-
sed -i "s#<REGION>#${{ matrix.region }}#g" service.deploy.yaml
92+
sed -i "s#<REGION>#${{ vars.PULUMI_GAR_LOCATION }}#g" service.deploy.yaml
9793
9894
# Process container images if specified
9995
if [ -n "${{ inputs.container_images }}" ]; then
@@ -192,7 +188,7 @@ jobs:
192188
run: |
193189
# Deploy the Knative YAML using gcloud
194190
gcloud run services replace service.deploy.yaml \
195-
--region=${{ matrix.region }} \
191+
--region=${{ vars.PULUMI_GAR_LOCATION }} \
196192
--project=${{ vars.PULUMI_GCP_PROJECT_ID }}
197193
198194
echo "Service deployed successfully!"
@@ -202,7 +198,7 @@ jobs:
202198
run: |
203199
URL=$(gcloud run services describe ${{ steps.set-service-name.outputs.final_service_name }} \
204200
--platform=managed \
205-
--region=${{ matrix.region }} \
201+
--region=${{ vars.PULUMI_GAR_LOCATION }} \
206202
--project=${{ vars.PULUMI_GCP_PROJECT_ID }} \
207203
--format='value(status.url)')
208204
echo "url=$URL" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)