File tree Expand file tree Collapse file tree 4 files changed +35
-20
lines changed
101-vswitch-docs-Example-01
101-vswitch-docs-Example-02 Expand file tree Collapse file tree 4 files changed +35
-20
lines changed Original file line number Diff line number Diff line change 44 branches :
55 - master
66 - main
7- types : [ ' opened', ' synchronize' ]
7+ types : [" opened", " synchronize" ]
88 paths :
9- - ' quickstarts/**'
10- - ' solution/**'
9+ - " quickstarts/**/**.tf "
10+ - " solution/**/**.tf "
1111
1212jobs :
1313 terraform-fmt :
2121 terraform -chdir=quickstarts fmt -check -recursive
2222 terraform -chdir=solution fmt -check -recursive
2323
24-
2524 terraform-validate :
2625 runs-on : ubuntu-latest
2726 steps :
3433 dir_names : " true"
3534 separator : " ,"
3635 files : |
37- quickstarts/*
38- solution/*
36+ {quickstarts,solution}/**/*.tf
3937 dir_names_max_depth : 3
4038 - name : Terraform validate
4139 run : |
@@ -58,38 +56,29 @@ jobs:
5856 fi
5957 done
6058
61-
6259 e2e-check :
6360 needs : [terraform-fmt, terraform-validate]
6461 runs-on : ubuntu-latest
6562 name : e2e check
6663 steps :
6764 - name : checkout
6865 uses : actions/checkout@v3
69- - name : Checking the max commits number
70- run : |
71- commitNum=${{ github.event.pull_request.commits }}
72- if [[ ${commitNum} -gt 1 ]]; then
73- echo -e "\nERROR: The PR has ${commitNum} commits, and please rebase it to 1.\n"
74- exit 1
75- fi
7666 - name : Get changed files
7767 id : changed-files
78- uses : tj-actions/changed-files@v34
68+ uses : tj-actions/changed-files@v46
7969 with :
8070 dir_names : " true"
8171 separator : " ,"
8272 files : |
83- quickstarts/*
84- solution/*
73+ {quickstarts,solution}/**/*.tf
8574 dir_names_max_depth : 3
8675 - name : set id
8776 id : set-job-id
8877 uses :
ayachensiyuan/[email protected] 89- env :
78+ env :
9079 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9180 with :
92- job-name : ' e2e check'
81+ job-name : " e2e check"
9382 - name : get pull request info
9483 run : |
9584 echo "repo name is" ${{github.event.pull_request.head.repo.full_name}}
Original file line number Diff line number Diff line change 1+ name : Pull Request
2+ on :
3+ pull_request :
4+ branches :
5+ - master
6+ - main
7+ types : ["opened", "synchronize"]
8+ paths :
9+ - " quickstarts/**"
10+ - " solution/**"
11+
12+ jobs :
13+ commit-check :
14+ runs-on : ubuntu-latest
15+ name : commit check
16+ steps :
17+ - name : checkout
18+ uses : actions/checkout@v3
19+ - name : Checking the max commits number
20+ run : |
21+ commitNum=${{ github.event.pull_request.commits }}
22+ if [[ ${commitNum} -gt 1 ]]; then
23+ echo -e "\nERROR: The PR has ${commitNum} commits, and please rebase it to 1.\n"
24+ exit 1
25+ fi
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ resource "alicloud_vswitch" "foo" {
1212 cidr_block = " 172.16.0.0/21"
1313 vpc_id = alicloud_vpc. foo . id
1414 zone_id = data. alicloud_zones . foo . zones . 0 . id
15- }
15+ }
Original file line number Diff line number Diff line change @@ -25,4 +25,5 @@ No modules.
2525## Inputs
2626
2727No inputs.
28+
2829<!-- END_TF_DOCS -->
You can’t perform that action at this time.
0 commit comments