ZIm/.github
Peter Tripp 70bde54a2c
ci: Lint GitHub Actions workflows with actionlint (#34729)
Added [rhysd/actionlint](https://github.com/rhysd/actionlint/) a static
checker for GitHub Actions workflow files.
Install locally with `brew install actionlint` the run with
`actionlint`.

Inspired by: https://github.com/zed-industries/zed/pull/34704 which
yielded this observation:

> In github actions: 
> 1. strings are truthy
> 2. `${{ }}` will become a string if it doesn't wrap the whole value.
>
> So `if: false && true` becomes `false`
> and `if: ${{ false && true }}` becomes `false`
> but `if: false && ${{ true }}` becomes `"false && true"` which
evaluates true
> The reason you sometimes need `${{ }}` is because YAML doesn't like
`!`
> so `if: !false` is invalid yaml
> and `if: ${{ !false }}` works just fine.

Changes:
- Add `actionlint` job
- Refactor `job_spec` job to be more readable
- Fix all `actionlint` and `shellcheck` errors in Actions workflows (62
in all)
- Add `self-mini-macos` and `self-32vcpu-windows-2022` labels to
self-hosted runners. Not strictly related, but useful if you need to
take a runner out of the rotation (since `macOS`, `self-hosted`, and
`ARM64` are auto-set and cannot be added/removed).
- Change ci.yml macos_relase to target `self-mini-macos` instead of
`bundle` which was previously deprecated.

This would've caught the error fixed in
https://github.com/zed-industries/zed/pull/34704. Here's what that [job
failure](https://github.com/zed-industries/zed/actions/runs/16376993944/job/46279281842?pr=34729)
would've looked like.

Release Notes:

- N/A
2025-07-18 15:15:07 -04:00
..
actions Use installed trusted signing (#34245) 2025-07-10 15:09:31 -07:00
ISSUE_TEMPLATE Update GitHub Issue Templates (June 2025) (#32399) 2025-06-09 15:25:17 +00:00
workflows ci: Lint GitHub Actions workflows with actionlint (#34729) 2025-07-18 15:15:07 -04:00
actionlint.yml ci: Lint GitHub Actions workflows with actionlint (#34729) 2025-07-18 15:15:07 -04:00
cherry-pick-bot.yml Maybe make cherry-pick-bot better 2024-02-28 15:26:30 -07:00
pull_request_template.md Simplify PR template (#19337) 2024-10-16 20:22:08 -06:00