elastic / elastic/ai-github-actions
[framework-best-practices] Expand actionlint scope to include all first-party workflows
- Dominant language
- Python
- Stars
- 11
- Forks
- 16
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 31
Description
## Framework / Library Best Practices Findings
### 1. `make lint-workflows` underuses `actionlint` by manually allowlisting files
**Library:** `actionlint` v1.7.10 (declared in `Makefile`)
**Library feature:** Repository-wide workflow discovery and linting (run `actionlint` without per-file arguments, or with broad globs).
**Current code:**
- `Makefile:209-213` builds a narrow `find` allowlist:
```make
find .github/workflows -maxdepth 1 ( -name "trigger-*.yml" ... -name "ci.yml" -o -name "release.yml" -o -name "smoke-test-install.yml" )
```
- `Makefile:214-217` lints only that list:
```make
$$ACTIONLINT "$$file" || exit 1
```
- Existing workflows are therefore skipped, including:
- `.github/workflows/ci-tests.yml`
- `.github/workflows/mkdocs.yml`
**Simplification:** Replace the manual allowlist with native `actionlint` discovery so all first-party workflows are linted automatically. This removes maintenance burden and prevents silently missing newly added workflow files.
**Why it matters:** Workflow syntax/expression issues in skipped files can merge undetected until runtime, increasing CI breakage risk.
**Documentation:** https://github.com/rhysd/actionlint#usage
## Suggested Actions
- [ ] Update `lint-workflows` to run `actionlint` with repo-wide discovery (or an explicit broad glob) instead of the current hand-maintained allowlist.
- [ ] Keep any necessary exclusions explicit (for generated files) so first-party workflow files like `ci-tests.yml` and `mkdocs.yml` are always linted.
> [!WARNING]
>
> ⚠️ Firewall blocked 1 domain
>
> The following domain was blocked by the firewall during workflow execution:
>
> - `docs.astral.sh`
>
> To allow these domains, add them to the `network.allowed` list in your workflow frontmatter:
>
> ```yaml
> network:
> allowed:
> - defaults
> - "docs.astral.sh"
> ```
>
> See [Network Configuration](https://github.github.com/gh-aw/reference/network/) for more information.
>
>
---
[What is this?](https://ela.st/github-ai-tools) | [From workflow: Trigger Framework Best Practices](https://github.com/elastic/ai-github-actions/actions/runs/25499353031)
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Contributor guide
Assessment
This issue has not been assessed yet.