Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check-circle

GitHub Action

Check Atlantis configuration file

v0.0.5

Check Atlantis configuration file

check-circle

Check Atlantis configuration file

Keep "atlantis.yaml" clean and ordered

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Check Atlantis configuration file

uses: antonblr/[email protected]

Learn more about this action in antonblr/check-atlantis-action

Choose a version

Check Atlantis configuration

CI

A GitHub action to check Atlantis (Terraform Pull Request Automation) configuration file (atlantis.yaml) for obsolete projects and projects ordering. Optionally commit the cleanup / sorting results back to PR.

Usage

name: Check Atlantis
on:
  # only run on PRs
  pull_request:
    types: [opened, synchronize]
    paths:
      - '.github/workflows/atlantis.yml'
      - 'atlantis.yaml'
      - '**.tf'

jobs:
  checks:
    runs-on: ubuntu-latest
    steps:
     - uses: actions/checkout@v3
       with:
         # https://github.com/actions/checkout/issues/719
         fetch-depth: 0
         ref: ${{ github.event.pull_request.head.ref }}

     - uses: antonblr/check-atlantis-action@v0
       with:
         commit-change: 'true'
         sort-by: 'name'

Action inputs

Name Description Default
atlantis-config Path to atlantis.yaml file, relative to $GITHUB_WORKSPACE (projects' root). ./atlantis.yaml
commit-change Commit updated (sorted and cleaned-up) atlantis.yaml back to the PR that triggered the workflow using the built-in Personal access token (PAT) token false
sort-by Key name to sort atlantis projects by. Valid values are dir or name. dir

Resources

https://github.com/runatlantis/atlantis