Skip to content

Commit

Permalink
Merge pull request #4 from clouddrove/PR-1
Browse files Browse the repository at this point in the history
terratest
  • Loading branch information
Sohan Yadav committed May 24, 2020
2 parents 1d4ffd9 + 8c41804 commit 5899719
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: 'Terraform GitHub Actions'
on:
- pull_request

jobs:
terraform:
name: 'Terraform'
runs-on: ubuntu-latest
steps:

- name: 'Checkout'
uses: actions/checkout@master

- name: 'Terraform Format'
uses: clouddrove/github-actions@v2.0
with:
actions_subcommand: 'fmt'

- name: 'Terraform Init'
uses: clouddrove/github-actions@v2.0
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example

- name: Configure AWS Credentials
uses: clouddrove/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: 'Terraform Plan'
uses: clouddrove/github-actions@v2.0
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Terratest'
uses: clouddrove/github-actions@v2.0
with:
actions_subcommand: 'terratest'
tf_actions_working_dir: ./_test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Slack Notification'
uses: clouddrove/action-slack@v2
with:
status: ${{ job.status }}
fields: repo,author
author_name: 'Clouddrove'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required
if: always()

0 comments on commit 5899719

Please sign in to comment.