Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Bump terraform-google-modules/github-actions-runners/google from 3.1.1 to 3.1.2 in /dev #30

Bump terraform-google-modules/github-actions-runners/google from 3.1.1 to 3.1.2 in /dev

Bump terraform-google-modules/github-actions-runners/google from 3.1.1 to 3.1.2 in /dev #30

Workflow file for this run

name: Lint and validate Development Environment
on:
push:
branches:
- main
paths:
- "dev/**/*.tf"
pull_request:
branches:
- main
paths:
- "dev/**/*.tf"
jobs:
check_fmt:
environment: development
defaults:
run:
working-directory: ./dev
name: Check Terraform Formatting
permissions:
contents: read
pull-requests: write
id-token: 'write'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
- name: Authenticate Google Cloud
uses: google-github-actions/auth@v1
id: auth
with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.SA_EMAIL }}
- name: Terraform Init
run: terraform init -input=false -no-color
- name: Terraform Format
run: terraform fmt -check -recursive
- name: Terraform Validate
run: terraform validate
- name: Comment on PR
uses: actions/github-script@v6
if: github.event_name == 'pull_request'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
<details><summary>Validation Output</summary>
\`\`\`\n
${{ steps.validate.outputs.stdout }}
\`\`\`
</details>
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`${{ env.tf_actions_working_dir }}\`, Workflow: \`${{ github.workflow }}\`*`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})