# Validate Workflows

Catch mistakes in GitHub Actions workflows before running infrastructure commands. Atmos validates workflow syntax and can report problems as inline annotations in CI.

## Workflow

Lint GitHub Actions workflows directly with Atmos before running infrastructure commands:

```yaml title=".github/workflows/validate.yml"
- name: Validate workflows
  run: atmos validate ci
```

`atmos validate ci` is an alias for [`atmos ci validate`](/cli/commands/ci/validate). With no file arguments it checks every `.yml` and `.yaml` workflow under the current working directory's `.github/workflows`. In GitHub Actions it emits inline annotations when `ci.enabled: true` and annotations are enabled. Use `--format=sarif` to write a SARIF document for an explicit code-scanning upload step.

To lint workflow fixtures or another workflow directory, pass `--workflow-path`. The repository includes an intentionally invalid scenario that is useful for a local smoke test:

```shell
atmos ci validate --workflow-path tests/fixtures/scenarios/invalid-github-actions-workflows/.github/workflows
```

The command reports the invalid `branch` key and exits with status 1.

Atmos respects `.github/actionlint.yaml` or `.github/actionlint.yml`, including custom self-hosted runner labels. See [`atmos ci validate`](/cli/commands/ci/validate) for file selection, output formats, and configuration details.
