|
7 | 7 | types: [ 'opened', 'synchronize' ]
|
8 | 8 | paths:
|
9 | 9 | - '.github/**'
|
10 |
| - - '.github/workflows/**' |
11 | 10 | - 'quickstarts/**'
|
| 11 | + - 'tech-solution/**' |
12 | 12 |
|
13 | 13 | jobs:
|
14 | 14 | terraform-fmt:
|
15 | 15 | runs-on: ubuntu-latest
|
16 | 16 | steps:
|
17 | 17 | - uses: actions/checkout@v4
|
18 |
| - |
19 | 18 | - uses: hashicorp/setup-terraform@v3
|
20 |
| - |
21 | 19 | - name: Terraform fmt
|
22 | 20 | id: fmt
|
23 |
| - run: terraform -chdir=quickstarts fmt -check -recursive |
| 21 | + run: | |
| 22 | + terraform -chdir=quickstarts fmt -check -recursive |
| 23 | + terraform -chdir=tech-solution fmt -check -recursive |
24 | 24 |
|
25 | 25 |
|
26 | 26 | terraform-validate:
|
27 | 27 | runs-on: ubuntu-latest
|
28 | 28 | steps:
|
29 | 29 | - uses: actions/checkout@v4
|
30 |
| - |
31 | 30 | - uses: hashicorp/setup-terraform@v3
|
32 |
| - |
33 | 31 | - name: Get changed files
|
34 | 32 | id: changed-files
|
35 | 33 | uses: tj-actions/changed-files@v34
|
36 | 34 | with:
|
37 | 35 | dir_names: "true"
|
38 | 36 | separator: ","
|
39 |
| - files: "quickstarts/*" |
| 37 | + files: | |
| 38 | + quickstarts/* |
| 39 | + tech-solution/* |
40 | 40 | dir_names_max_depth: 3
|
41 |
| - - name: pr-check |
| 41 | + - name: Terraform validate |
42 | 42 | run: |
|
43 | 43 | CHANGED_FOLDERS="${{ steps.changed-files.outputs.all_changed_files }}"
|
44 | 44 | if [ -z "$CHANGED_FOLDERS" ]; then
|
45 |
| - echo "No changed quickstarts found" |
| 45 | + echo "No changed terraform code found" |
46 | 46 | exit 0
|
47 | 47 | fi
|
48 | 48 |
|
|
54 | 54 | terraform -chdir=$f init -upgrade
|
55 | 55 | terraform -chdir=$f validate
|
56 | 56 | if [[ $? -ne 0 ]]; then
|
57 |
| - echo -e "\033[31m[ERROR]\033[0m: Some quickstarts codes contain errors, and please running terraform validate command before pushing." |
| 57 | + echo -e "\033[31m[ERROR]\033[0m: Some terraform codes contain errors, and please running terraform validate command before pushing." |
58 | 58 | exit 1
|
59 | 59 | fi
|
60 | 60 | done
|
|
63 | 63 | e2e-check:
|
64 | 64 | needs: [terraform-fmt, terraform-validate]
|
65 | 65 | runs-on: ubuntu-latest
|
66 |
| - name: 'e2e check' |
| 66 | + name: e2e check |
67 | 67 | steps:
|
68 | 68 | - name: checkout
|
69 | 69 | uses: actions/checkout@v3
|
|
80 | 80 | with:
|
81 | 81 | dir_names: "true"
|
82 | 82 | separator: ","
|
83 |
| - files: "quickstarts/*" |
| 83 | + files: | |
| 84 | + quickstarts/* |
| 85 | + tech-solution/* |
84 | 86 | dir_names_max_depth: 3
|
85 | 87 | - name: set id
|
86 | 88 | id: set-job-id
|
|
98 | 100 | run: |
|
99 | 101 | CHANGED_FOLDERS="${{ steps.changed-files.outputs.all_changed_files }}"
|
100 | 102 | if [ -z "$CHANGED_FOLDERS" ]; then
|
101 |
| - echo "No changed quickstarts found" |
| 103 | + echo "No changed terraform code found" |
102 | 104 | exit 0
|
103 | 105 | fi
|
104 | 106 | objectPath="github-action/${{github.repository}}/e2e/Action-${{github.run_number}}-${{github.run_id}}-${{ steps.set-job-id.outputs.jobId }}"
|
|
0 commit comments