-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* github action * github action * github action * github action
- Loading branch information
1 parent
92acbe3
commit c315d8b
Showing
12 changed files
with
151 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
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/[email protected] | ||
with: | ||
actions_subcommand: 'fmt' | ||
|
||
- name: 'Terraform Init for default-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'init' | ||
tf_actions_working_dir: ./_example/default-s3 | ||
|
||
- name: 'Terraform Init for encryption-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'init' | ||
tf_actions_working_dir: ./_example/encryption-s3 | ||
|
||
- name: 'Terraform Init for logging-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'init' | ||
tf_actions_working_dir: ./_example/logging-s3 | ||
|
||
- name: 'Terraform Init For website-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'init' | ||
tf_actions_working_dir: ./_example/website-s3 | ||
|
||
- 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 For default-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'plan' | ||
tf_actions_working_dir: ./_example/default-s3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Terraform Plan for encryption-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'plan' | ||
tf_actions_working_dir: ./_example/encryption-s3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Terraform Plan for logging-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'plan' | ||
tf_actions_working_dir: ./_example/logging-s3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Terraform Plan For website-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'plan' | ||
tf_actions_working_dir: ./_example/website-s3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Terratest for default-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'terratest' | ||
tf_actions_working_dir: ./_test/default-s3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Terratest for encryption-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'terratest' | ||
tf_actions_working_dir: ./_test/encryption-s3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Terratest for website-s3' | ||
uses: clouddrove/[email protected] | ||
with: | ||
actions_subcommand: 'terratest' | ||
tf_actions_working_dir: ./_test/website-s3 | ||
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters