GithubHelp home page GithubHelp logo

isabella232 / setup-tflint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zendesk/setup-tflint

0.0 0.0 0.0 3.35 MB

A GitHub action that installs Terraform linter TFLint

License: MIT License

JavaScript 97.45% Shell 1.89% HCL 0.66%

setup-tflint's Introduction

Setup TFLint Action

A GitHub action that installs a Terraform linter TFLint executable in the PATH.

Inputs

tflint_version

Required The version of TFLint which will be installed. See TFLint releases page for valid versions.

If version is "latest", the action will get the latest version number using Octokit.

Default: "latest"

github_token

If set, github_token will be used for Octokit authentication. Authenticating will increase the API rate limit when querying the tflint repository to get the latest release version.

Outputs

The action does not have any output.

Usage

name: Lint
on:
  push:
    branches: [ master ]
  pull_request:

jobs:
  tflint:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]

    steps:
    - uses: actions/checkout@v2
      name: Checkout source code

    - uses: actions/cache@v2
      name: Cache plugin dir
      with:
        path: ~/.tflint.d/plugins
        key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }}

    - uses: terraform-linters/setup-tflint@v1
      name: Setup TFLint
      with:
        tflint_version: v0.29.0

    - name: Show version
      run: tflint --version

    - name: Init TFLint
      run: tflint --init

    - name: Run TFLint
      run: tflint -f compact

Latest Release

- uses: terraform-linters/setup-tflint@v1

or specify it explicitly as

- uses: terraform-linters/setup-tflint@v1
  with:
    tflint_version: latest

Using GITHUB_TOKEN

- uses: terraform-linters/setup-tflint@v1
  with:
    github_token: ${{ secrets.GITHUB_TOKEN }}

Loading Shared Configuration

- uses: terraform-linters/setup-tflint@v1
- uses: terraform-linters/tflint-load-config-action@v0
  with:
    source-repo: me/tflint-config
- run: tflint -f compact

Checks

This action supports Problem Matchers for --format compact. You can see annotations in pull requests when TFLint prints issues with the compact format.

annotations

Releasing

To create a new version:

npm version $inc && git push --follow-tags

setup-tflint's People

Contributors

bendrucker avatar dependabot[bot] avatar wata727 avatar jgeurts avatar karol-bujacek avatar martinhaus avatar chenrui333 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.