Skip to content

"ubuntu-slim" incorrectly dowloads latest on node-version "24" or "24.x" #1492

@mikeharder

Description

@mikeharder

Description:
On ubuntu-slim, using node-version of 24 or 24.x downloads 24.13.1, instead of using 24.13.0 from the cache. On ubuntu-latest, both 24 and 24.x use the cached version. On both images, leaving version empty "" used the cached 24.13.0.

Action version:
v6

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
24

Repro steps:

name: setup-node

on:
  pull_request:
  workflow_dispatch:

permissions:
  contents: read

jobs:
  test:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        node-version: ['24.x', '24', '']
        os: [ubuntu-slim, ubuntu-latest]

    steps:
      - uses: actions/setup-node@v6
        with:
          node-version: ${{ matrix.node-version }}
      
      - run: node -v

https://github.com/mikeharder/test-setup-node/blob/192c349bd754b02fcb70057fa5ebe9b6315c73a0/.github/workflows/setup-node.yaml

https://github.com/mikeharder/test-setup-node/actions/runs/21978003995

Expected behavior:
ubuntu-latest:

Run actions/setup-node@v6
  with:
    node-version: 24.x
    check-latest: false
    token: ***
    package-manager-cache: true
##[debug]isExplicit: 
##[debug]explicit? false
##[debug]isExplicit: 20.20.0
##[debug]explicit? true
##[debug]isExplicit: 22.22.0
##[debug]explicit? true
##[debug]isExplicit: 24.13.0
##[debug]explicit? true
##[debug]evaluating 3 versions
##[debug]matched: 24.13.0
##[debug]checking cache: /opt/hostedtoolcache/node/24.13.0/x64
##[debug]Found tool in cache node 24.13.0 x64
Found in cache @ /opt/hostedtoolcache/node/24.13.0/x64

Actual behavior:
ubuntu-slim:

Run actions/setup-node@v6
  with:
    node-version: 24.x
    check-latest: false
    token: ***
    package-manager-cache: true
##[debug]isExplicit: 
##[debug]explicit? false
##[debug]evaluating 0 versions
##[debug]match not found
Attempting to download 24.x...
Acquiring 24.13.1 - x64 from https://github.com/actions/node-versions/releases/download/24.13.1-21889660756/node-24.13.1-linux-x64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/59cebe8b-4470-41c9-973c-af5e8e15f687 -f /home/runner/work/_temp/693643e2-4471-4597-b383-bb315dcd6f5e
Adding to the cache ...

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions