Commit Graph
340 Commits
Author SHA1 Message Date
Kevin Stillhammer f9cdb47d48 Reject paths in .tool-versions (#1007)
## Summary
- reject path-like uv versions from `.tool-versions`
- reject path-like Python versions from `.tool-versions`
- document the restriction and cover Unix and Windows paths in tests

## Testing
- `npm ci --ignore-scripts`
- `npm run all`

Refs: pi-session 019ff4bb-8b7c-7c4b-8bdf-7c188dfa2e3f
2026-08-12 13:18:20 +02:00
Kevin Stillhammer 8d6402c9b7 chore(deps): roll up Dependabot updates (#1004)
## Summary

Roll up the remaining dependency changes from Dependabot PRs #997, #998,
#999, #1000, #1001, #1002, and #1003:

- update `github/codeql-action` to 4.37.6
- update `zizmorcore/zizmor-action` to 0.6.2
- update `undici` to 8.10.0
- update `smol-toml` to 1.7.1
- update `@biomejs/biome` and its schema to 2.5.6
- regenerate the published bundles

PRs #905 and #907 were excluded because their requested Jest and pep440
versions are already present on `main`.

## Validation

- `npm run all`
- `actionlint .github/workflows/codeql-analysis.yml
.github/workflows/test.yml`
- `uvx zizmor .github/workflows/codeql-analysis.yml
.github/workflows/test.yml`
- `git diff --check`

Refs: pi-session 019ff0c9-8e00-72d3-99ad-d4383a4c57d4
2026-08-11 15:08:35 +02:00
Kevin Stillhammer 46f427bd47 Read Python version from .tool-versions (#996)
## Summary
- read the Python version from an explicitly selected `.tool-versions`
file
- preserve `python-version` and existing `UV_PYTHON` precedence
- add parser, input, and workflow coverage and update documentation and
bundled action artifacts

## Validation
- `npm run all`
- `actionlint .github/workflows/test.yml`
- `uvx zizmor .github/workflows/test.yml`

Closes #983

Refs: pi-session 019ff01a-544c-79f3-8f73-a00132af39f5
2026-08-11 14:26:03 +02:00
Kevin Stillhammer 8473c7fea4 chore(deps): roll up Dependabot updates (#994)
## Summary

Roll up the remaining net changes from the open Dependabot updates:

- release-drafter/release-drafter 7.7.0 (#990)
- github/codeql-action 4.37.4 (#987, #988, #989)
- zizmorcore/zizmor-action 0.6.1 (#986)
- @actions/cache 6.2.0 (#975)
- @biomejs/biome 2.5.4 (#974)
- undici 8.7.0 (#973)

The Jest 30.4.2 (#905) and @renovatebot/pep440 5.0.0 (#907) updates are
already present on main and require no additional changes.

This also updates the Biome schema, applies the formatter changes from
Biome 2.5.4, and regenerates the published bundles.

## Testing

- `npm run all`
- `actionlint`
- `git diff --check`

Refs: pi-session 019ff01b-f917-73c1-950e-2966956f263c
2026-08-11 11:27:16 +02:00
Kevin Stillhammer 18d451d679 Add latest-known version selector (#993)
## Summary

- add `latest-known` as an explicit version selector
- resolve it locally to the newest version in the bundled checksum table
- preserve existing default and `latest` behavior
- document custom-manifest checksum semantics and update published
bundles

## Testing

- `npm ci --ignore-scripts`
- `npm run all` (99 tests passed)

Closes #919

Refs: pi-session 019fed0e-6019-7504-911b-bd9955cbbd49
2026-08-11 11:15:59 +02:00
Kevin Stillhammer f45168497b Disable automatic caching for sensitive events (#992)
## Summary

- disable `enable-cache: auto` for `pull_request_target`,
`workflow_run`, and `release` events
- disable automatic caching for tag pushes while leaving branch pushes
unchanged
- preserve explicit `enable-cache: true` as an override
- run a `workflow_run` integration fixture with `act` in pull request CI
and verify caching is disabled
- document the behavior and update the published bundles

## Testing

- `npm run all`
- `actionlint .github/workflows/test.yml
__tests__/workflows/workflow-run.yml`
- `uvx zizmor __tests__/workflows/workflow-run.yml`

Closes #984

Refs: pi-session 019fec42-9b26-714e-a359-830ac4401ecd
2026-08-10 18:12:08 +02:00
github-actions[bot]andeifinger b68407c192 chore: update known checksums for 0.12.3 (#991)
chore: update known checksums for 0.12.3

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-08-09 10:26:32 +02:00
github-actions[bot]andeifinger 696e4e1bf2 chore: update known checksums for 0.12.2 (#985)
chore: update known checksums for 0.12.2

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-08-06 15:23:16 +02:00
github-actions[bot]andeifinger 7e7e21ddc3 chore: update known checksums for 0.12.1 (#982)
chore: update known checksums for 0.12.1

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-08-01 10:26:59 +02:00
github-actions[bot]andeifinger 094aa226ed chore: update known checksums for 0.12.0 (#981)
chore: update known checksums for 0.12.0

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-07-29 09:17:43 +02:00
github-actions[bot]andeifinger d269b9917d chore: update known checksums for 0.11.31/0.11.32 (#972)
chore: update known checksums for 0.11.32

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-07-24 08:30:02 +02:00
Kevin Stillhammer c771a70e62 chore(deps): roll up Dependabot updates (#970)
## Summary

Roll up the remaining dependency changes from Dependabot PRs:

- #966: update `actions/setup-node` from 6.4.0 to 7.0.0
- #965: update `js-yaml` from 4.1.1 to 5.2.1
- #964: update `@types/node` from 26.0.1 to 26.1.1
- #963: update `esbuild` from 0.28.0 to 0.28.1

PRs #907 and #905 require no net changes because `@renovatebot/pep440`
5.0.0 and Jest 30.4.2 are already on `main`.

## Validation

- `npm run all`

Refs: pi-session 019f854e-4714-73ad-8de2-e79900f41b4d
2026-07-21 17:36:40 +02:00
github-actions[bot]andeifinger 2f537ca87c chore: update known checksums for 0.11.30 (#968)
chore: update known checksums for 0.11.30

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-07-21 17:30:36 +02:00
Kevin Stillhammer 2269552d54 Speed up version client by partial response reads (#807) 2026-07-21 17:26:32 +02:00
Kevin Stillhammer 71966eff34 chore(deps): roll up Dependabot updates (#962)
## Summary

- update all CodeQL actions from 4.36.2 to 4.37.0
- update `smol-toml` from 1.6.1 to 1.7.0
- update `@types/node` from 25.5.0 to 26.0.1
- update `@vercel/ncc` from 0.44.0 to 0.44.1
- regenerate bundled action artifacts

Supersedes #950, #951, #952, #957, #958, and #959. The updates from #905
and #907 are already present on `main`.

Refs: pi-session 019f796d-a374-7a76-a8e4-1699b89ec8e6
2026-07-19 10:28:45 +02:00
Chenxin Zhong f12b1f0a84 fix: fall back to distribution ID when os-release has no version field (#961)
## Summary

`getLinuxOSNameVersion()` throws `Failed to determine Linux
distribution. Could not read /etc/os-release or /usr/lib/os-release` on
distributions whose os-release is readable but contains **no version
field at all** — no `VERSION_ID`, no `VERSION_CODENAME`, no `BUILD_ID`.
The error message is misleading in that case, and the action fails even
though the distribution is perfectly identifiable.

Void Linux is such a distribution. Its os-release is:

```sh
$ cat /etc/os-release
NAME="Void"
ID="void"
PRETTY_NAME="Void Linux"
HOME_URL="https://voidlinux.org/"
DOCUMENTATION_URL="https://docs.voidlinux.org/"
LOGO="void-logo"
ANSI_COLOR="0;38;2;71;128;97"

DISTRIB_ID="void"
```

Unlike Arch (fixed by #912 via `BUILD_ID`) and debian:unstable (fixed
via `VERSION_CODENAME`, #773), Void ships only `ID`, so both existing
fallbacks miss it. This breaks any workflow using `container:
ghcr.io/void-linux/void-glibc-full` with caching enabled — e.g.
SageMath's CI started failing after bumping to v8:
https://github.com/sagemath/sage/actions/runs/29456228986/job/87489892141
(worked around downstream in https://github.com/sagemath/sage/pull/42547
by injecting a fake `BUILD_ID` into the container's os-release).

This PR adds a last-resort fallback: if `ID` is present but no version
field is, return the plain `ID` (`void`), following the same reasoning
as #912 — a stable cache key for a rolling release is better than
crashing. Distributions with a version field are unaffected, and files
without even an `ID` still raise the existing error.
2026-07-19 10:04:14 +02:00
github-actions[bot]andeifinger ecd24dd710 chore: update known checksums for 0.11.29 (#960)
chore: update known checksums for 0.11.29

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-07-16 10:58:57 +02:00
Kevin Stillhammer 11f9893b08 chore: roll up Dependabot updates (#948)
## Summary
- roll up remaining open Dependabot updates for zizmor-action,
@actions/cache, @biomejs/biome, and @vercel/ncc
- update Biome schema and migrate recommended rules to the new preset
field
- regenerate dist bundles

## Validation
- npm run check
- npm run all

Refs: pi-session 019f4055-b39c-778f-9d9f-092115939c33
2026-07-08 11:05:26 +02:00
github-actions[bot]andeifinger e80544d808 chore: update known checksums for 0.11.28 (#947)
chore: update known checksums for 0.11.28

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-07-08 08:04:53 +02:00
github-actions[bot]andeifinger cd462639a9 chore: update known checksums for 0.11.27 (#944)
chore: update known checksums for 0.11.27

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-07-07 10:07:28 +02:00
Kevin Stillhammer d31148d669 Strip environment markers from detected uv dependency pins (#938)
## Summary
- strip PEP 508 environment markers before extracting uv versions from
dependency entries
- cover dependency-group pins with and without whitespace before the
marker
- cover requirements-style pins with markers

Fixes #920

## Validation
- npm ci --ignore-scripts
- npm run all

Refs: pi-session 019f316a-4108-7975-892f-ee5bf8abc7c3
2026-07-05 10:47:17 +02:00
Kevin Stillhammer 17c398959b Fix cache keys for Python version ranges (#937)
## Summary
- URL-encode the Python version component before adding it to the cache
key
- URL-encode the user-provided cache suffix for the same reason
- Add cache key tests for Python ranges, comma-containing suffixes, and
unchanged simple inputs

Fixes #914

Refs: pi-session 019f3164-85e7-7817-bffd-501d89b3a1fd

## Tests
- npm run all
2026-07-05 10:46:44 +02:00
Kevin Stillhammer 3cc3c11fdf chore(deps): roll up Dependabot updates (#936)
## Summary
- Roll up open Dependabot npm and GitHub Actions updates
- Update Biome schema to 2.4.16
- Regenerate bundled dist artifacts

## Validation
- npm run all

Refs: pi-session 019f3160-c4af-7606-b4be-648e0abff131
2026-07-05 10:34:07 +02:00
github-actions[bot]andeifinger c5680ec91f chore: update known checksums for 0.11.26 (#930)
chore: update known checksums for 0.11.26

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-07-01 07:53:57 +02:00
github-actions[bot]andeifinger 224c887d48 chore: update known checksums for 0.11.25 (#929)
chore: update known checksums for 0.11.25

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-27 09:33:56 +02:00
github-actions[bot]andeifinger b173788282 chore: update known checksums for 0.11.24 (#925)
chore: update known checksums for 0.11.24

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-24 09:18:23 +02:00
github-actions[bot]andeifinger e53da17296 chore: update known checksums for 0.11.23 (#922)
chore: update known checksums for 0.11.23

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-23 08:54:47 +02:00
github-actions[bot]andeifinger a9b33f0240 chore: update known checksums for 0.11.22 (#921)
chore: update known checksums for 0.11.22

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-19 08:02:13 +02:00
somaz 3faa3174e6 feat: support uv.lock as a version-file source (#918)
Adds `uv.lock` as a supported `version-file` source. When `uv` is locked
as a
dependency in `uv.lock`, the action now installs the exact pinned
version,
closing the gap reported in #682.

This is useful for deterministic CI: the same uv version is used until
the
lockfile is updated, which avoids "CI worked yesterday, fails today"
drift and
reduces supply-chain exposure from auto-installing the latest release.

The implementation mirrors the existing `version-file` parsers — a new
`uv.lock`
entry in the parser registry reads the `[[package]]` whose `name = "uv"`
and
returns its locked `version`. Scoped to explicit `version-file:
uv.lock`;
workspace auto-detection is left as a possible follow-up to avoid
precedence
ambiguity with `uv.toml` / `pyproject.toml`.

Validation (local, Node 23; dist build is esbuild-deterministic):
- `npm run all` → build clean, biome clean, package clean, jest 77/77
- New tests: 3 unit (`uv-lock-file.test.ts`) + 1 integration — exact pin
resolves
  through the full pipeline (`uv.lock` → `0.8.17`)
- dist rebuilt + committed (single bundle, no spurious churn)

related: #682
2026-06-19 07:08:57 +02:00
github-actions[bot]andeifinger ca5ddd015e chore: update known checksums for 0.11.21 (#917)
chore: update known checksums for 0.11.21

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-12 07:54:16 +02:00
github-actions[bot]andeifinger e2f6a928de chore: update known checksums for 0.11.20 (#915)
chore: update known checksums for 0.11.20

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-11 08:28:31 +02:00
Hans Gaiser ed73b5df24 fix: use BUILD_ID as backup for determining os version (#912)
On Arch Linux based runners, the setup fails with because
`/etc/os-release` does not contain `VERSION_ID` or `VERSION_CODENAME`.
It does contain a `BUILD_ID` which is set to `rolling`:

```sh
$ cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
```

This PR makes `getLinuxOSNameVersion` return `arch-rolling`.

There is no update from arch that would change the returned value, so
the same cache will always be used. Is this an issue? I'm not sure. At
least it's better than crashing because `os-release` does not contain
the expected values :).
2026-06-09 13:12:37 +02:00
github-actions[bot]andeifinger 21d5da3bc3 chore: update known checksums for 0.11.19 (#909)
chore: update known checksums for 0.11.19

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-04 07:53:58 +02:00
Kevin Stillhammer fac544c07d chore(deps): roll up dependabot updates (#903)
Rolls up the current open Dependabot npm updates:

- #848 esbuild from 0.27.5 to 0.28.0
- #847 undici from 8.0.0 to 8.3.0
- #846 ts-jest from 29.4.9 to 29.4.11
- #841 @biomejs/biome from 2.4.10 to 2.4.15, including the matching
biome.json schema URL update

Validation:

- npm run all
2026-06-03 10:21:55 +02:00
Kevin Stillhammer 363c64a728 chore(deps): roll up dependabot updates (#901)
Rolls up the current open Dependabot npm updates:

- #848 esbuild from 0.27.4 to 0.27.5
- #847 undici from 7.24.2 to 8.0.0
- #846 ts-jest from 29.4.6 to 29.4.9
- #841 @biomejs/biome from 2.4.7 to 2.4.10, including the matching
biome.json schema URL update
- #834 smol-toml from 1.6.0 to 1.6.1

Validation:

- npm run all
2026-06-03 09:49:40 +02:00
github-actions[bot]andeifinger 8e642c5e62 chore: update known checksums for 0.11.18 (#899)
chore: update known checksums for 0.11.18

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-02 08:33:00 +02:00
Kevin Stillhammer a92cb43098 Add quiet input to suppress info-level log output (#898)
## Summary

Adds a new `quiet` input (default: `false`) that suppresses `info`-level
log output when set to `true`. Only warnings and errors are shown.

Contributes to: #868
2026-05-31 21:13:30 +02:00
Kevin Stillhammer b9c8c4c7ba feat: add download-from-astral-mirror input (#897)
## Summary

Add a new boolean input `download-from-astral-mirror` (default: `true`)
that controls whether uv is downloaded from the Astral mirror or
directly from GitHub Releases.

When set to `false`, the mirror rewrite is skipped entirely and the
download goes straight to GitHub Releases.

Closes: #870
2026-05-31 11:47:01 +02:00
Kevin Stillhammer feda7fc6a9 fix: report unexpected setup failures (#895)
## Summary
- add top-level uncaughtException and unhandledRejection handlers for
the setup entrypoint
- report unexpected failures through core.setFailed with stack/context
- regenerate the committed setup bundle
2026-05-31 11:17:46 +02:00
eifinger-bot 8dc20b2aca fix: add timeout to fetch to prevent silent hangs (#883)
Add `AbortSignal.timeout(5s)` to fetch requests to ensure they fail fast
instead of hanging indefinitely when network issues occur.
2026-05-31 09:37:59 +02:00
github-actions[bot]andeifinger e7108c6ccc chore: update known checksums for 0.11.17 (#892)
chore: update known checksums for 0.11.17

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-29 11:10:08 +02:00
github-actions[bot]andeifinger 12d13f90bc chore: update known checksums for 0.11.16 (#889)
chore: update known checksums for 0.11.16

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-22 07:56:51 +02:00
github-actions[bot]andeifinger ed07c76224 chore: update known checksums for 0.11.15 (#885)
chore: update known checksums for 0.11.15

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-19 07:42:01 +02:00
Zsolt Dollenstein 853401723d Limit GitHub tokens to github.com download URLs (#878)
This makes the Astral mirror slightly less special.
2026-05-13 13:26:05 +02:00
Kevin Stillhammer 7568f55a9a increase libuv-workaround timeout to 100ms (#880)
This should fix
https://github.com/astral-sh/setup-uv/issues/686#issuecomment-4389301919
2026-05-13 08:28:39 +02:00
github-actions[bot]andeifinger a81585cbb0 chore: update known checksums for 0.11.14 (#879)
chore: update known checksums for 0.11.14

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-13 07:37:30 +02:00
github-actions[bot]andeifinger 88aa608651 chore: update known checksums for 0.11.13 (#877)
chore: update known checksums for 0.11.13

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-11 08:14:58 +02:00
github-actions[bot]andeifinger 00714ea9dc chore: update known checksums for 0.11.12 (#876)
chore: update known checksums for 0.11.12

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-09 08:17:00 +02:00
github-actions[bot]andeifinger 9d91aa17e1 chore: update known checksums for 0.11.11 (#873)
chore: update known checksums for 0.11.11

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-07 09:14:04 +02:00
github-actions[bot]andeifinger 363818fa0d chore: update known checksums for 0.11.9/0.11.10 (#871)
chore: update known checksums for 0.11.9/0.11.10

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-05-06 08:13:20 +02:00