Skip to content

Commit 1cbc33e

Browse files
authored
Update and rename test.yml to pr.yml
1 parent e817bac commit 1cbc33e

File tree

1 file changed

+5
-34
lines changed

1 file changed

+5
-34
lines changed

.github/workflows/test.yml renamed to .github/workflows/pr.yml

+5-34
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: Terraform GitHub Actions Demo
2-
run-name: ${{ github.actor }} ${{ github.event_name }}
1+
name: Pull request workflow
2+
run-name: PR
33
on:
44
pull_request:
55
types:
66
- opened
77
- synchronize
88
# - ready_for_review
99
# - closed
10-
pull_request_review:
11-
types: [submitted]
10+
# pull_request_review:
11+
# types: [submitted]
1212

1313
jobs:
14-
Terraform_step_1:
14+
tf_plan:
1515
runs-on: self-hosted
1616
steps:
1717
- name: Checkout
@@ -89,32 +89,3 @@ jobs:
8989
- name: Terraform Plan Status
9090
if: steps.plan.outcome == 'failure'
9191
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 }}

0 commit comments

Comments
 (0)