Skip to content

Update workflow

Update workflow #8

Workflow file for this run

#
# Copyright (c) Microsoft Corporation
# Licensed under the MIT License.
#
name: PR Dispatch Workflow
on:
pull_request:
types: [opened, synchronize, reopened]
env:
TF_VERSION: "1.8.4"
TF_LINT_VERSION: "v0.50.3"
jobs:
linting:
name: Format and Lint Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ env.TF_VERSION }}
- name: Install Terraform Linter
uses: terraform-linters/setup-tflint@v4
with:
tflint_version: ${{ env.TF_LINT_VERSION }}
- name: Run TFLint with reviewdog
uses: reviewdog/action-tflint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
level: info
tflint_init: true
dispatch:
runs-on: ubuntu-latest
strategy:
matrix:
scenario:
- standalone-scenarios-azuread.json
- standalone-scenarios.json
- standalone-compute.json
- standalone-networking.json
- standalone-scenarios-longrunners.json
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
event-type: pr-${{ matrix.scenario }}
client-payload: '{"scenario": "${{ (matrix.scenario) }}", "sha": "${{ github.event.pull_request.head.sha }}"}'