File tree 1 file changed +5
-34
lines changed
1 file changed +5
-34
lines changed Original file line number Diff line number Diff line change 1
- name : Terraform GitHub Actions Demo
2
- run-name : ${{ github.actor }} ${{ github.event_name }}
1
+ name : Pull request workflow
2
+ run-name : PR
3
3
on :
4
4
pull_request :
5
5
types :
6
6
- opened
7
7
- synchronize
8
8
# - ready_for_review
9
9
# - closed
10
- pull_request_review :
11
- types : [submitted]
10
+ # pull_request_review:
11
+ # types: [submitted]
12
12
13
13
jobs :
14
- Terraform_step_1 :
14
+ tf_plan :
15
15
runs-on : self-hosted
16
16
steps :
17
17
- name : Checkout
89
89
- name : Terraform Plan Status
90
90
if : steps.plan.outcome == 'failure'
91
91
run : exit 1
92
-
93
- Terraform_step_2 :
94
- if : github.event.review.state == 'approved'
95
- runs-on : self-hosted
96
- environment : protected
97
- needs : ['Terraform_step_1']
98
- steps :
99
- - run : echo "This PR was approved"
100
- - name : Terraform Apply
101
- id : terraform_apply
102
- run : terraform apply -auto-approve -input=false
103
-
104
- - name : Auto merge on success
105
- if : steps.terraform_apply.outcome == 'success'
106
- # uses: "pascalgn/[email protected] "
107
- # env:
108
- # GITHUB_TOKEN: "${{ secrets.PAT }}"
109
- # MERGE_LABELS: ""
110
- # MERGE_METHOD: "squash"
111
- # UPDATE_LABELS: ""
112
- # uses: daneden/enable-automerge-action@v1
113
- # with:
114
- # github-token: ${{ secrets.PAT }}
115
- # allowed-author: "ctvedt"
116
- # merge-method: SQUASH
117
- uses : kenhowardpdx/auto-merge-action@v1
118
- with :
119
- merge_method : SQUASH
120
- token : ${{ secrets.PAT }}
You can’t perform that action at this time.
0 commit comments