@@ -353,6 +353,7 @@ jobs:
353353 with :
354354 bucket_name : ${{ github.event.inputs.bucket_name }}
355355 environment : ${{ github.event.inputs.test_environment }}
356+ phase : infra
356357 region : ${{ github.event.inputs.region }}
357358 action : create
358359 force_recreate : false
@@ -395,12 +396,12 @@ jobs:
395396 - name : Download Backend Configuration
396397 uses : actions/download-artifact@v4
397398 with :
398- name : backend-config-${{ github.event.inputs.test_environment || 'dev' }} -${{ github.run_id }}
399- path : ./
399+ name : backend-config-${{ github.event.inputs.test_environment }}-infra -${{ github.run_id }}
400+ path : environments/${{ github.event.inputs.test_environment }}/infra
400401
401402 - name : Initialize Test Environment Backend
402403 run : |
403- cd environments/${{ github.event.inputs.test_environment || 'dev' }}
404+ cd environments/${{ github.event.inputs.test_environment }}/infra
404405
405406 echo "🔄 Initializing with remote backend..."
406407 echo "Backend bucket: ${{ needs.setup-backend.outputs.bucket_name }}"
@@ -409,7 +410,7 @@ jobs:
409410 - name : Deploy Test Environment
410411 id : deploy-env
411412 run : |
412- cd environments/${{ github.event.inputs.test_environment || 'dev' }}
413+ cd environments/${{ github.event.inputs.test_environment }}/infra
413414
414415 # Plan and apply minimal environment for testing
415416 terraform plan -out=test.tfplan
@@ -424,14 +425,14 @@ jobs:
424425
425426 # Validate the deployed environment
426427 ./scripts/validate.sh \
427- --env=${{ github.event.inputs.test_environment || 'dev' }} \
428+ --env=${{ github.event.inputs.test_environment }} \
428429 --components=coder \
429430 --detailed
430431
431432 - name : Cleanup Test Environment
432433 if : always() && steps.deploy-env.outputs.environment_deployed == 'true'
433434 run : |
434- cd environments/${{ github.event.inputs.test_environment || 'dev' }}
435+ cd environments/${{ github.event.inputs.test_environment || 'dev' }}/infra
435436
436437 # Clean up the test environment
437438 echo "🔥 Cleaning up test environment..."
0 commit comments