Skip to content

Commit

Permalink
Merge pull request #6 from cruxstack/dev
Browse files Browse the repository at this point in the history
ci: add tflint job
  • Loading branch information
sgtoj authored Aug 11, 2023
2 parents 7f481d5 + 83a2cd9 commit 7a555a6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ RUN SYSTEM_ARCH=$(dpkg --print-architecture) \
&& terraform version \
&& rm terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip

# install tflint
RUN curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash

# install docker
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: test

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Terraform Setup
run: |
terraform init
- name: Lint Terraform
uses: reviewdog/action-tflint@master
with:
github_token: ${{ secrets.github_token }}
filter_mode: "nofilter"
12 changes: 12 additions & 0 deletions version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@ terraform {
required_version = ">= 0.13.0"

required_providers {
archive = {
source = "hashicorp/archive"
version = ">= 2.4.0"
}
docker = {
source = "kreuzwerker/docker"
version = ">= 3.0.0, < 4.0.0"
}
null = {
source = "hashicorp/null"
version = ">= 3.2.1"
}
random = {
source = "hashicorp/random"
version = ">= 3.5.1"
}
}
}

0 comments on commit 7a555a6

Please sign in to comment.