Skip to content

Commit 5774dc5

Browse files
committed
test
1 parent 1723754 commit 5774dc5

File tree

2 files changed

+15
-23
lines changed

2 files changed

+15
-23
lines changed

.github/workflows/e2e.yml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,23 @@ jobs:
1414
terraform-fmt:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: checkout
18-
uses: actions/checkout@v3
19-
- name: terraform-fmt
20-
run: |
21-
if [ ! -f /usr/local/bin/terraform ]; then
22-
wget -q https://releases.hashicorp.com/terraform/1.6.0/terraform_1.6.0_linux_amd64.zip
23-
unzip terraform_1.6.0_linux_amd64.zip -d /usr/local/bin/
24-
fi
25-
error=false
26-
echo "===> Terraform fmt -diff checking in quickstarts"
27-
(terraform -chdir=quickstarts fmt -check -recursive -list=false) || error=true
28-
terraform -chdir=quickstarts fmt -diff -recursive
29-
if ${error}; then
30-
echo -e "\033[31m[ERROR]\033[0m: Some quickstarts codes has not been formatted, and please running terraform fmt --recursive command before pushing."
31-
exit 1
32-
fi
17+
- uses: actions/checkout@v4
18+
19+
- uses: hashicorp/setup-terraform@v3
20+
21+
- name: Terraform fmt
22+
id: fmt
23+
run: terraform -chdir=quickstarts fmt -check -recursive -list=false
24+
continue-on-error: true
25+
3326

3427
terraform-validate:
3528
runs-on: ubuntu-latest
3629
steps:
37-
- name: checkout
38-
uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
31+
32+
- uses: hashicorp/setup-terraform@v3
33+
3934
- name: Get changed files
4035
id: changed-files
4136
uses: tj-actions/changed-files@v34
@@ -46,10 +41,6 @@ jobs:
4641
dir_names_max_depth: 3
4742
- name: pr-check
4843
run: |
49-
if [ ! -f /usr/local/bin/terraform ]; then
50-
wget -q https://releases.hashicorp.com/terraform/1.6.0/terraform_1.6.0_linux_amd64.zip
51-
unzip terraform_1.6.0_linux_amd64.zip -d /usr/local/bin/
52-
fi
5344
CHANGED_FOLDERS="${{ steps.changed-files.outputs.all_changed_files }}"
5445
if [ -z "${{ github.event.number }}" ]; then
5546
CHANGED_FOLDERS=$(find ./quickstarts -maxdepth 2 -mindepth 2 -type d | tr '\n' ',')

quickstarts/VPC/101-vpc-docs-Example/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ resource "alicloud_vpc" "default" {
99
cidr_block = "10.0.0.0/8"
1010
vpc_name = var.name
1111
enable_ipv6 = true
12-
}
12+
}
13+

0 commit comments

Comments
 (0)