Skip to content

fix(documentation): Update documentation version to 3.0.3 #29

fix(documentation): Update documentation version to 3.0.3

fix(documentation): Update documentation version to 3.0.3 #29

Workflow file for this run

---
name: Terraform
on:
pull_request:
paths:
- "**.tf"
- ".terraform-version"
pull_request_target:
paths:
- "**.tf"
jobs:
terraform:
name: Terraform
# If the PR is coming from a fork (pull_request_target), ensure it's opened by "dependabot[bot]".
# Otherwise, clone it normally.
if: |
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') ||
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]')
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- name: Checkout
if: ${{ github.event_name != 'pull_request_target' }}
uses: actions/[email protected]
- name: Checkout
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/[email protected]
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get Terraform version
id: terraform_version
uses: juliangruber/[email protected]
with:
path: ./.terraform-version
- name: Setup Terraform
uses: hashicorp/[email protected]
with:
terraform_version: ${{ steps.terraform_version.outputs.content }}
- name: Terraform Format
id: fmt
run: terraform fmt -recursive -check
- name: Terraform Init
id: init
run: terraform init -upgrade
- name: Terraform Validate
id: validate
run: terraform validate -no-color
- name: Comment on PR
uses: actions/[email protected]
if: always()
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.outputs.stdout }}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})