-
Notifications
You must be signed in to change notification settings - Fork 709
64 lines (54 loc) · 1.6 KB
/
pr_dispatch.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# 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:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: pr-${{ matrix.scenario }}
client-payload: '{"scenario": "${{ (matrix.scenario) }}", "sha": "${{ github.event.pull_request.head.sha }}"}'