File tree Expand file tree Collapse file tree 1 file changed +8
-18
lines changed
Expand file tree Collapse file tree 1 file changed +8
-18
lines changed Original file line number Diff line number Diff line change 1- name : ' Terraform'
2-
3- # on:
4- # workflow_dispatch: # manual action run
1+ name : ' Terraform Apply'
52
63on :
7- push :
8- branches :
9- - PP-12736-tf-workflow
4+ issue_comment :
5+ types : [edited, created]
106
117permissions :
128 contents : read
139
1410jobs :
1511 terraform :
1612 name : ' Terraform Apply'
17- runs-on : ubuntu-latest
18- environment : development
19- defaults :
20- run :
21- shell : bash
13+ runs-on : self-hosted
14+ if : |
15+ github.event.issue.pull_request &&
16+ contains(github.event.comment.body, '/terraform_apply')
2217
2318 steps :
2419 # Checkout the repository to the GitHub Actions runner
2520 - name : Checkout
2621 uses : actions/checkout@v3
2722
28- # Install the latest version of Terraform
29- - name : Setup Terraform
30- uses : hashicorp/setup-terraform@v3
31-
32-
3323 # Run Terraform commands
3424 - name : Terraform Init
3525 run : terraform init
5848 TF_VAR_timezone : ${{ vars.TIMEZONE }}
5949 TF_VAR_ssh_access_source_ranges : ${{ vars.SSH_ACCESS_SOURCE_RANGES }}
6050 TF_VAR_ui_access_source_ranges : ${{ vars.UI_ACCESS_SOURCE_RANGES }}
61- TF_VAR_deployment_name : ${{ vars.DEPLOYMENT_NAME }}
51+ TF_VAR_deployment_name : " github- ${{ github.event.pull_request.number }}-${{ github.run_id }} "
6252 TF_VAR_instance_name : ${{ vars.INSTANCE_NAME }}
You can’t perform that action at this time.
0 commit comments