This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
forked from tmknom/terraform-aws-elasticache-redis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request tmknom#17 from tmknom/add-config-for-github-actions
Add config for GitHub Actions
- Loading branch information
Showing
4 changed files
with
128 additions
and
0 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,14 @@ | ||
name: JSON | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
format: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Prettier | ||
run: docker run --rm -v ${PWD}:/work tmknom/prettier --list-different --parser=json '**/*.json' |
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,24 @@ | ||
name: Markdown | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: markdownlint | ||
run: docker run --rm -i -v ${PWD}:/work tmknom/markdownlint | ||
|
||
format: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Prettier | ||
run: docker run --rm -v ${PWD}:/work tmknom/prettier --list-different --parser=markdown '**/*.md' |
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,66 @@ | ||
name: Terraform | ||
on: | ||
pull_request: | ||
|
||
env: | ||
TERRAFORM_VERSION: 0.12.24 | ||
AWS_DEFAULT_REGION: us-east-1 | ||
|
||
jobs: | ||
format: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Format all | ||
uses: hashicorp/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tf_actions_version: ${{ env.TERRAFORM_VERSION }} | ||
tf_actions_comment: true | ||
tf_actions_subcommand: fmt | ||
|
||
validate: | ||
name: Validate | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
strategy: | ||
matrix: | ||
dir: | ||
- . | ||
- examples/minimal | ||
- examples/complete | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Init | ||
uses: hashicorp/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tf_actions_version: ${{ env.TERRAFORM_VERSION }} | ||
tf_actions_working_dir: ${{ matrix.dir }} | ||
tf_actions_comment: true | ||
tf_actions_subcommand: init | ||
- name: Validate | ||
uses: hashicorp/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tf_actions_version: ${{ env.TERRAFORM_VERSION }} | ||
tf_actions_working_dir: ${{ matrix.dir }} | ||
tf_actions_comment: true | ||
tf_actions_subcommand: validate | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: TFLint | ||
run: docker run --rm -v ${PWD}:/data wata727/tflint |
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,24 @@ | ||
name: YAML | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: yamllint | ||
run: docker run --rm -v ${PWD}:/work tmknom/yamllint --strict . | ||
|
||
format: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Prettier | ||
run: docker run --rm -v ${PWD}:/work tmknom/prettier --list-different --parser=yaml '**/*.y*ml' |