https://github.com/antonblr/check-atlantis-action
Keep 'atlantis.yaml' clean and ordered.
https://github.com/antonblr/check-atlantis-action
action actions atlantis github-actions
Last synced: 4 months ago
JSON representation
Keep 'atlantis.yaml' clean and ordered.
- Host: GitHub
- URL: https://github.com/antonblr/check-atlantis-action
- Owner: antonblr
- License: mit
- Created: 2022-08-08T17:51:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T02:44:27.000Z (over 2 years ago)
- Last Synced: 2024-03-09T21:04:01.449Z (over 2 years ago)
- Topics: action, actions, atlantis, github-actions
- Language: TypeScript
- Homepage:
- Size: 1.2 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Check Atlantis configuration
[](https://github.com/antonblr/check-atlantis-action/actions/workflows/test.yml?query=branch:main)
A GitHub action to check [Atlantis](https://www.runatlantis.io/) (Terraform Pull Request Automation) configuration file (`atlantis.yaml`) for obsolete projects and projects ordering. Optionally commit the cleanup / sorting results back to PR.
### Usage
```yaml
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