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 :
@@ -21,21 +21,19 @@ jobs:
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 :
2827 - uses : actions/checkout@v4
2928 - uses : hashicorp/setup-terraform@v3
3029 - name : Get changed files
3130 id : changed-files
32- uses : tj-actions/changed-files@v34
31+ uses : tj-actions/changed-files@v46
3332 with :
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,21 +56,13 @@ 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
7868 uses : tj-actions/changed-files@v34
@@ -82,14 +72,17 @@ jobs:
8272 files : |
8373 quickstarts/*
8474 solution/*
75+ files_ignore : |
76+ quickstarts/**/**.md
77+ solution/**/**.md
8578 dir_names_max_depth : 3
8679 - name : set id
8780 id : set-job-id
8881 uses :
ayachensiyuan/[email protected] 89- env :
82+ env :
9083 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9184 with :
92- job-name : ' e2e check'
85+ job-name : " e2e check"
9386 - name : get pull request info
9487 run : |
9588 echo "repo name is" ${{github.event.pull_request.head.repo.full_name}}
10497 fi
10598 objectPath="github-action/${{github.repository}}/e2e/Action-${{github.run_number}}-${{github.run_id}}-${{ steps.set-job-id.outputs.jobId }}"
10699 curl -H "X-Fc-Invocation-Type:Async" -s https://example-ci-terrafoodule-ci-svrrwvrpnj.ap-southeast-1.fcapp.run/?branch=${{github.event.pull_request.head.ref}}\&repo_name=${{github.event.pull_request.head.repo.full_name}}\&oss_object_path=${objectPath}
107- go run scripts/e2e_check.go ${objectPath}
100+ go run scripts/e2e_check.go ${objectPath}
0 commit comments