mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-12-02 21:33:04 +01:00
ci: add jactionlint and address workflow findings (#14304)
* ci: add jactionlint and address workflow findings * ci(installer): pin vercel 66.6.0 and group major updates 68.0.0 was released the same day it was pinned, which skips the seven-day cooldown this branch adds. Vercel ships a major version about weekly, so majors join the npm group to keep it to one PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: lock workflow action dependencies Add .github/workflows/actions.lock, generated by gh actions-lock. It records the commit for every action the workflows use, including actions called by other actions. Workflows now reference release tags and the lockfile holds the commit that runs. Verify the lockfile in the Workflow lint job so a workflow change that skips regenerating it fails the pull request. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * ci: lock and time-limit the alias collision job The job arrived from master in #10859 after this branch was cut, so it had no timeout and its setup-python version was missing from the lockfile. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: mcornella <1441704+mcornella@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
12 files changed
+5890
-33
No files matched your search
@@ -0,0 +1,66 @@
|
||||
# Workflow checks
|
||||
|
||||
The `Workflow lint` workflow runs jactionlint on pull requests and pushes to
|
||||
`master`. It checks workflows and Dependabot configuration with the default
|
||||
profile, including ShellCheck for inline shell scripts. It runs without online
|
||||
checks or publishing credentials.
|
||||
|
||||
To run the same checks locally, install jactionlint 2.6.0 and ShellCheck, then run
|
||||
from the repository root:
|
||||
|
||||
```sh
|
||||
jactionlint --profile=default --no-online
|
||||
```
|
||||
|
||||
Keep the local jactionlint version aligned with the pinned action in `lint.yml`.
|
||||
There is no baseline: new findings fail the check. Any rule exception should be
|
||||
limited to the relevant line and explain why it is needed.
|
||||
|
||||
## Action lockfile
|
||||
|
||||
`actions.lock` records the commit for every action the workflows use, including
|
||||
actions called by other actions. Workflows reference release tags; the lockfile
|
||||
holds the commit that runs. Do not edit it by hand.
|
||||
|
||||
After adding a workflow or changing any `uses:` line, regenerate it with the
|
||||
[`gh actions-lock`](https://github.com/github/gh-actions-lock) extension and
|
||||
commit the result:
|
||||
|
||||
```sh
|
||||
gh extension install github/gh-actions-lock
|
||||
gh actions-lock
|
||||
```
|
||||
|
||||
Dependabot updates the lockfile entry in the same pull request when it bumps an
|
||||
action.
|
||||
|
||||
The `Workflow lint` workflow verifies the lockfile on every pull request and
|
||||
fails when it does not match the workflows.
|
||||
|
||||
## Project tracking
|
||||
|
||||
`project.yml` intentionally uses `pull_request_target` so the GitHub App can add
|
||||
fork contributions to the project board. It must not check out or execute PR
|
||||
code. Project IDs are validated before passing them through step outputs, and
|
||||
PR-derived plugin/theme names are restricted to letters, digits, dots, underscores
|
||||
and hyphens.
|
||||
|
||||
The App tokens request explicit permissions: project tracking needs organization
|
||||
projects write access and issues/pull requests read access; dependency updates
|
||||
need contents read access and issues/pull requests write access. Dependency pushes
|
||||
use the job's separate `GITHUB_TOKEN` with contents write access.
|
||||
|
||||
## Installer deployment
|
||||
|
||||
The Vercel CLI is pinned in `installer/package.json` and `installer/package-lock.json`.
|
||||
Dependabot checks this dependency weekly, with a seven-day cooldown for version
|
||||
updates, like the other configured ecosystems. Deployment installs the lockfile
|
||||
with `npm ci --ignore-scripts`; `.vercelignore` uploads only `install.sh`.
|
||||
|
||||
After changing the CLI version, update its lockfile and verify the CLI locally:
|
||||
|
||||
```sh
|
||||
npm install --package-lock-only --ignore-scripts --prefix .github/workflows/installer
|
||||
npm ci --ignore-scripts --prefix .github/workflows/installer
|
||||
.github/workflows/installer/node_modules/.bin/vercel --version
|
||||
```
|
||||
Reference in new issue
Block a user