8686 outputs :
8787 backend : ${{ steps.filter.outputs.backend }}
8888 frontend : ${{ steps.filter.outputs.frontend }}
89- infra : ${{ steps.filter.outputs.infra }}
9089 ci : ${{ steps.filter.outputs.ci }}
9190 steps :
9291 - uses : actions/checkout@v4
9998 - 'backend/**'
10099 frontend:
101100 - 'frontend/**'
102- infra:
103- - 'infra/**'
104101 ci:
105102 - '.github/**'
106103 - 'package.json'
@@ -346,7 +343,7 @@ jobs:
346343 timeout-minutes : 15
347344 needs : [changes]
348345 if : |
349- ( needs.changes.outputs.infra == 'true' || needs.changes.outputs. ci == 'true') &&
346+ needs.changes.outputs.ci == 'true' &&
350347 github.event_name == 'pull_request'
351348 strategy :
352349 matrix :
@@ -360,6 +357,12 @@ jobs:
360357 steps :
361358 - uses : actions/checkout@v4
362359
360+ - name : Checkout infra repository
361+ uses : actions/checkout@v4
362+ with :
363+ repository : ${{ github.repository_owner }}/mypythonproject1-infra
364+ path : mypythonproject1-infra
365+
363366 - name : Load CI environment
364367 run : |
365368 grep -v '^\s*#' config/.env.test | grep -v '^\s*$' >> $GITHUB_ENV
@@ -375,20 +378,20 @@ jobs:
375378 aws-region : ${{ env.AWS_REGION }}
376379
377380 - name : Terraform fmt check
378- working-directory : infra
381+ working-directory : mypythonproject1- infra
379382 run : terraform fmt -check -recursive
380383
381384 - name : Terraform init (no remote state — validation only)
382- working-directory : infra
385+ working-directory : mypythonproject1- infra
383386 run : terraform init -backend=false
384387
385388 - name : Terraform validate
386- working-directory : infra
389+ working-directory : mypythonproject1- infra
387390 run : terraform validate
388391
389392 - name : Terraform plan
390393 id : plan
391- working-directory : infra
394+ working-directory : mypythonproject1- infra
392395 env :
393396 TF_VAR_environment : ${{ matrix.environment }}
394397 TF_VAR_aws_region : ${{ env.AWS_REGION }}
@@ -402,7 +405,7 @@ jobs:
402405 with :
403406 script : |
404407 const fs = require('fs');
405- const plan = fs.readFileSync('infra/plan-output.txt', 'utf8').substring(0, 65000);
408+ const plan = fs.readFileSync('mypythonproject1- infra/plan-output.txt', 'utf8').substring(0, 65000);
406409 github.rest.issues.createComment({
407410 issue_number: context.issue.number,
408411 owner: context.repo.owner, repo: context.repo.repo,
@@ -445,7 +448,7 @@ jobs:
445448 # Commitlint fails only on PRs (skipped on push)
446449 [[ "$CL" == "failure" ]] && { echo "❌ Commitlint failed"; exit 1; }
447450
448- # Terraform plan failure blocks PRs when infra changed
451+ # Terraform plan failure blocks PRs when terraform-plan runs
449452 [[ "$TF" == "failure" ]] && { echo "❌ Terraform plan failed"; exit 1; }
450453
451454 echo "✅ All gates passed"
0 commit comments