Skip to content

chore(deps): update dependency gruntwork-io/terragrunt to v0.71.1 #743

chore(deps): update dependency gruntwork-io/terragrunt to v0.71.1

chore(deps): update dependency gruntwork-io/terragrunt to v0.71.1 #743

name: Terraform PR check
on:
workflow_dispatch:
pull_request:
types: [synchronize, opened, ready_for_review]
branches:
- main
env:
TERRAGRUNT_TFPATH: terraform
TENV_QUIET: t
TENV_AUTO_INSTALL: true
permissions:
contents: write
pull-requests: write
jobs:
check-code:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Create GitHub App token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ steps.app-token.outputs.token }}
- name: Download terraform assets
uses: ./.github/actions/download-terraform-assets
with:
token: ${{ steps.app-token.outputs.token }}
- name: Setup
uses: ./.github/actions/setup
- name: Test scripts
run: |
shellspec
- name: Init
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: |
cd accounts
terragrunt run-all init -upgrade
- name: Setup terraform version settings
run: |
chmod +x scripts/*
./scripts/setup_terraform_version_settings.sh \
./accounts \
./files/terraform/version.tf
- name: Run pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --all-files
- name: Auto commit
id: auto-commit
if: always()
uses: EndBug/add-and-commit@v9
with:
author_name: "github-actions[bot]"
author_email: "github-actions[bot]@users.noreply.github.com"
committer_name: "github-actions[bot]"
committer_email: "github-actions[bot]@users.noreply.github.com"
message: "chore: ${{ github.workflow }} (${{ github.job }})"
- name: Cancel workflow
run: |
if [ "${{ steps.auto-commit.outputs.committed }}" == "true" ]; then
exit 1
fi
plan:
needs: [check-code]
runs-on: ubuntu-latest
steps:
- name: Create GitHub App token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ steps.app-token.outputs.token }}
- name: Download terraform assets
uses: ./.github/actions/download-terraform-assets
with:
token: ${{ steps.app-token.outputs.token }}
- name: Setup
uses: ./.github/actions/setup
- name: Init
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: |
cd accounts
terragrunt run-all init
- name: Plan and comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd accounts
$(git rev-parse --show-toplevel)/scripts/output_plan_results.sh
github-comment exec -k default -- cat plan_results.md
github-comment hide