Skip to content

Commit

Permalink
[PRMP-639] - change working-directory to stack
Browse files Browse the repository at this point in the history
  • Loading branch information
NogaNHS committed Aug 9, 2024
1 parent ef2bcd7 commit d30aaf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/PR-terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: ./.github/workflows/base-terraform-plan-and-apply.yml
with:
environment: ${{ matrix.environment }}
working-directory: ./stacks/${{ matrix.terraform_stack }}/terraform
terraform_stack: ./stacks/${{ matrix.terraform_stack }}/terraform
secrets: inherit


12 changes: 6 additions & 6 deletions .github/workflows/base-terraform-plan-and-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
description: "Is workflow run on deployment"
type: boolean
default: false
working-directory:
description: "Which working directory to use"
terraform_stack:
description: "Which terraform stack directory to run"
type: string
required: true

Expand All @@ -22,7 +22,7 @@ jobs:
environment: ${{ inputs.environment }}
defaults:
run:
working-directory: ${{inputs.working-directory}}
working-directory: ./stacks/${{ inputs.terraform_stack }}/terraform
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Terraform Init
id: init
run: |
terraform init -no-color -backend-config="key=${{ secrets.AWS_STATE_S3_KEY }}" \
terraform init -no-color -backend-config="key=gp-registrations-mi/${{ input.terraform_stack }}/terraform.tfstate" \
-backend-config="bucket=${{ secrets.AWS_STATE_BUCKET }}" \
-backend-config="dynamodb_table=${{ secrets.AWS_STATE_LOCK_TABLE }}"
shell: bash
Expand Down Expand Up @@ -83,11 +83,11 @@ jobs:
issue_number: context.issue.number,
});
const botComment = comments.find(comment => {
return comment.user.type === 'Bot' && comment.body.includes('Report for ${{inputs.working-directory}} environment: ${{ inputs.environment }} ')
return comment.user.type === 'Bot' && comment.body.includes('Report for ${{inputs.terraform_stack}} environment: ${{ inputs.environment }} ')
});
// 2. Prepare format of the comment
const output = `### Report for ${{inputs.working-directory}} environment: ${{ inputs.environment }}
const output = `### Report for ${{inputs.terraform_stack}} environment: ${{ inputs.environment }}
#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
Expand Down

0 comments on commit d30aaf2

Please sign in to comment.