Skip to content

feat(platforms): fall back to ubuntu-latest image for ubuntu-slim runner#6100

Open
toller892 wants to merge 1 commit into
nektos:masterfrom
toller892:feat/ubuntu-slim-platform
Open

feat(platforms): fall back to ubuntu-latest image for ubuntu-slim runner#6100
toller892 wants to merge 1 commit into
nektos:masterfrom
toller892:feat/ubuntu-slim-platform

Conversation

@toller892
Copy link
Copy Markdown

Summary

GitHub Actions' ubuntu-slim 1-vCPU runner (in public preview since 2025-10-28) uses the same base distro as ubuntu-latest. Today act prints:

🚧  Skipping unsupported platform -- Try running with `-P ubuntu-slim=...`

and the user has to manually pass -P ubuntu-slim=ghcr.io/catthehacker/ubuntu:act-latest every time, which defeats the point of having a fallback for "latest" Ubuntu runners.

This change adds ubuntu-slim to the default platform map in cmd/platforms.go, resolving it to the same image as ubuntu-latest (node:16-buster-slim). Users can still override it via -P ubuntu-slim=... exactly like the other platforms — newPlatforms() already supports overriding any default.

Changes

  • cmd/platforms.go: add ubuntu-slimnode:16-buster-slim to the default platforms map (1 line).
  • cmd/platforms_test.go (new): two unit tests covering the default and the user-override path.

Testing

$ go test ./cmd/ -run 'TestNewPlatforms' -v
=== RUN   TestNewPlatformsDefaults
--- PASS: TestNewPlatformsDefaults (0.00s)
=== RUN   TestNewPlatformsUserOverride
--- PASS: TestNewPlatformsUserOverride (0.00s)
PASS
ok      github.com/nektos/act/cmd       0.782s

go vet ./cmd/ passes. Pre-existing TestFlags/TestFlag-bug-report failure is unrelated (requires a running Docker daemon).

Closes #6003

GitHub Actions' ubuntu-slim runner (1-vCPU Linux runner, in public
preview since 2025-10-28) uses the same base distro as ubuntu-latest,
so act should resolve it to the same default image instead of
printing 'Skipping unsupported platform'.

Users can still override via -P ubuntu-slim=... like any other
platform.

Fixes nektos#6003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ubuntu-slim should natively supported

1 participant