Merge pull request #72 from HideyoshiSolutions/develop
develop - feat: adds event dispatch
This commit is contained in:
19
.github/workflows/terraform.yml
vendored
19
.github/workflows/terraform.yml
vendored
@@ -4,9 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
terraform:
|
terraform:
|
||||||
name: 'Terraform'
|
name: 'Terraform'
|
||||||
@@ -14,10 +11,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TF_WORKSPACE: 'prod'
|
TF_WORKSPACE: 'prod'
|
||||||
|
|
||||||
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
|
permissions:
|
||||||
defaults:
|
contents: read
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the repository to the GitHub Actions runner
|
# Checkout the repository to the GitHub Actions runner
|
||||||
@@ -42,4 +37,12 @@ jobs:
|
|||||||
# Note: It is recommended to set up a required "strict" status check in your repository for "Terraform Cloud". See the documentation on "strict" required status checks for more information: https://help.github.com/en/github/administering-a-repository/types-of-required-status-checks
|
# Note: It is recommended to set up a required "strict" status check in your repository for "Terraform Cloud". See the documentation on "strict" required status checks for more information: https://help.github.com/en/github/administering-a-repository/types-of-required-status-checks
|
||||||
- name: Terraform Apply
|
- name: Terraform Apply
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
run: terraform apply -auto-approve -input=false
|
run: terraform apply -auto-approve -input=false
|
||||||
|
|
||||||
|
- name: Trigger Cluster Deployment
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: peter-evans/repository-dispatch@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.ACTIONS_KEY }}
|
||||||
|
repository: HideyoshiSolutions/infra-hideyoshi.com
|
||||||
|
event-type: deploy
|
||||||
Reference in New Issue
Block a user