Skip to content

[Windows] Deprecate Windows 2019 runner #12473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/announcement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ body:
- label: macOS 14 Arm64
- label: macOS 15
- label: macOS 15 Arm64
- label: Windows Server 2019
- label: Windows Server 2022
- label: Windows Server 2025
- type: textarea
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ body:
- label: macOS 14 Arm64
- label: macOS 15
- label: macOS 15 Arm64
- label: Windows Server 2019
- label: Windows Server 2022
- label: Windows Server 2025
- type: textarea
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/tool-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ body:
- label: macOS 14 Arm64
- label: macOS 15
- label: macOS 15 Arm64
- label: Windows Server 2019
- label: Windows Server 2022
- label: Windows Server 2025
- type: textarea
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/windows2019.yml

This file was deleted.

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ Here are a few things you can do that will increase the likelihood of your pull

- For every new tool, add validation scripts and update the software report script to ensure that it is included in the documentation.
- If the tool is available on multiple platforms (macOS, Windows, Linux), make sure you include it on as many as possible.
- If installing multiple versions of the tool, consider putting the list of versions in the corresponding `toolset.json` file. This will help other customers configure their builds flexibly. See [toolset-windows-2019.json](images/windows/toolsets/toolset-2019.json) as an example.
- If installing multiple versions of the tool, consider putting the list of versions in the corresponding `toolset.json` file. This will help other customers configure their builds flexibly. See [toolset-windows-2022.json](images/windows/toolsets/toolset-2022.json) as an example.
- Use consistent naming across all files.
- Validation scripts should be simple and shouldn't change the image content.

### Windows

- Add a script that will install the tool and put the script in the `scripts/build` folder.
There are a bunch of helper functions that could simplify your code: `Install-ChocoPackage`, `Install-Binary`, `Install-VSIXFromFile`, `Install-VSIXFromUrl`, `Invoke-DownloadWithRetry`, `Test-IsWin19`, `Test-IsWin22` (find the full list of helpers in [ImageHelpers.psm1](images/windows/scripts/helpers/ImageHelpers.psm1)).
There are a bunch of helper functions that could simplify your code: `Install-ChocoPackage`, `Install-Binary`, `Install-VSIXFromFile`, `Install-VSIXFromUrl`, `Invoke-DownloadWithRetry`, `Test-IsWin22` (find the full list of helpers in [ImageHelpers.psm1](images/windows/scripts/helpers/ImageHelpers.psm1)).
- Add a script that will validate the tool installation and put the script in the `scripts/tests` folder.
We use [Pester v5](https://github.com/pester/pester) for validation scripts. If the tests for the tool are complex enough, create a separate `*.Tests.ps1`. Otherwise, use `Tools.Tests.ps1` for simple tests.
Add `Invoke-PesterTests -TestFile <testFileName> [-TestName <describeName>]` at the end of the installation script to ensure that your tests will be run.
- Add changes to the software report generator `images/windows/scripts/docs-gen/Generate-SoftwareReport.ps1`. The software report generator is used to generate an image's README file, e.g. [Windows2019-Readme.md](images/windows/Windows2019-Readme.md) and uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS).
- Add changes to the software report generator `images/windows/scripts/docs-gen/Generate-SoftwareReport.ps1`. The software report generator is used to generate an image's README file, e.g. [Windows2022-Readme.md](images/windows/Windows2022-Readme.md) and uses [MarkdownPS](https://github.com/Sarafian/MarkdownPS).

### Ubuntu

Expand Down
2 changes: 0 additions & 2 deletions README.md
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make sense to have a section with a link to to a new document containing removed images so it's easy to find.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ To build a VM machine from this repo's source, see the [instructions](docs/creat
| macOS 13 Arm64 | `macos-13-xlarge` | [macOS-13-arm64] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fsubir0071%2F385e39188f4280878bada99250e99db7%2Fraw%2Fmacos-13-arm64.json) |
| Windows Server 2025 | `windows-2025` | [windows-2025] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fsubir0071%2F385e39188f4280878bada99250e99db7%2Fraw%2Fwin25.json) |
| Windows Server 2022 | `windows-latest` or `windows-2022` | [windows-2022] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fsubir0071%2F385e39188f4280878bada99250e99db7%2Fraw%2Fwin22.json) |
| Windows Server 2019 | `windows-2019` | [windows-2019] | ![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fsubir0071%2F385e39188f4280878bada99250e99db7%2Fraw%2Fwin19.json) |

### Label scheme

Expand All @@ -41,7 +40,6 @@ To build a VM machine from this repo's source, see the [instructions](docs/creat
[ubuntu-22.04]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
[windows-2025]: https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md
[windows-2022]: https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
[windows-2019]: https://github.com/actions/runner-images/blob/main/images/windows/Windows2019-Readme.md
[macOS-13]: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
[macOS-13-arm64]: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-arm64-Readme.md
[macOS-14]: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md
Expand Down
4 changes: 2 additions & 2 deletions docs/create-image-and-azure-resources.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitHub Actions Runner Images

The runner-images project uses [Packer](https://www.packer.io/) to generate disk images for Windows 2019/2022 and Ubuntu 22.04/24.04.
The runner-images project uses [Packer](https://www.packer.io/) to generate disk images for Windows 2022/2025 and Ubuntu 22.04/24.04.

Each image is configured by a HCL2 Packer template that specifies where to build the image (Azure, in this case),
and what steps to run to install software and prepare the disk.
Expand Down Expand Up @@ -98,7 +98,7 @@ Finally, run the `GenerateResourcesAndImage` function, setting the mandatory arg
- `ResourceGroupName` - the name of the resource group that will store the resulting artifact (e.g., "imagegen-test").
The resource group must already exist in your Azure subscription;
- `AzureLocation` - the location where resources will be created (e.g., "East US");
- `ImageType` - the type of image to build (valid options are "Windows2019", "Windows2022", "Windows2025", "Ubuntu2204", "Ubuntu2404").
- `ImageType` - the type of image to build (valid options are "Windows2022", "Windows2025", "Ubuntu2204", "Ubuntu2404").

This function automatically creates all required Azure resources and initiates the Packer image generation for the selected image type.

Expand Down
15 changes: 5 additions & 10 deletions helpers/GenerateResourcesAndImage.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
$ErrorActionPreference = 'Stop'

enum ImageType {
Windows2019 = 1
Windows2022 = 2
Windows2025 = 3
Ubuntu2204 = 4
Ubuntu2404 = 5
Windows2022 = 1
Windows2025 = 2
Ubuntu2204 = 3
Ubuntu2404 = 4
}

Function Get-PackerTemplate {
Expand All @@ -18,10 +17,6 @@ Function Get-PackerTemplate {

switch ($ImageType) {
# Note: Double Join-Path is required to support PowerShell 5.1
([ImageType]::Windows2019) {
$relativeTemplatePath = Join-Path (Join-Path "windows" "templates") "build.windows-2019.pkr.hcl"
$imageOS = "win19"
}
([ImageType]::Windows2022) {
$relativeTemplatePath = Join-Path (Join-Path "windows" "templates") "build.windows-2022.pkr.hcl"
$imageOS = "win22"
Expand Down Expand Up @@ -88,7 +83,7 @@ Function GenerateResourcesAndImage {
.PARAMETER ResourceGroupName
The name of the resource group to store the resulting artifact. Resource group must already exist.
.PARAMETER ImageType
The type of image to generate. Valid values are: Windows2019, Windows2022, Windows2025, Ubuntu2204, Ubuntu2404.
The type of image to generate. Valid values are: Windows2022, Windows2025, Ubuntu2204, Ubuntu2404, UbuntuMinimal.
.PARAMETER ManagedImageName
The name of the managed image to create. The default is "Runner-Image-{{ImageType}}".
.PARAMETER AzureLocation
Expand Down
3 changes: 1 addition & 2 deletions images/windows/Windows2022-Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| [[Windows Server 2025] image will no longer have D:/ drive accessible to users from 2025-07-14](https://github.com/actions/runner-images/issues/12416) |
| [[Windows, Ubuntu, MacOS] Breaking change: Updating Azure PowerShell Module version as 12.5.x from 2025-07-04](https://github.com/actions/runner-images/issues/12333) |
| [[Windows & Ubuntu] .NET 6 will be removed from the images on 2025-08-01.](https://github.com/actions/runner-images/issues/12241) |
| [The Windows 2019 Actions runner image will begin deprecation on 2025-06-01 and will be fully unsupported by 2025-06-30](https://github.com/actions/runner-images/issues/12045) |
| [Windows Server 2025 is now available](https://github.com/actions/runner-images/issues/11228) |
***
# Windows Server 2022
- OS Version: 10.0.20348 Build 3807
Expand Down Expand Up @@ -545,4 +545,3 @@ Note: MSYS2 is pre-installed on image but not added to PATH.
| mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022 | sha256:61113bfac602c8517c16283aa99be4b0886590aba97159c3a5f63620481afb4c | 2025-06-10 |
| mcr.microsoft.com/windows/nanoserver:ltsc2022 | sha256:23fa4e796f4d02d462beadb844f8985ca4583b1b0f75295137f5968dab255b09 | 2025-06-05 |
| mcr.microsoft.com/windows/servercore:ltsc2022 | sha256:c489e1737a833a111f0f35b28257b1071d30b6db6b9ee50e88b7c08b901efc67 | 2025-06-05 |

3 changes: 1 addition & 2 deletions images/windows/Windows2025-Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| [[Windows Server 2025] image will no longer have D:/ drive accessible to users from 2025-07-14](https://github.com/actions/runner-images/issues/12416) |
| [[Windows, Ubuntu, MacOS] Breaking change: Updating Azure PowerShell Module version as 12.5.x from 2025-07-04](https://github.com/actions/runner-images/issues/12333) |
| [[Windows & Ubuntu] .NET 6 will be removed from the images on 2025-08-01.](https://github.com/actions/runner-images/issues/12241) |
| [The Windows 2019 Actions runner image will begin deprecation on 2025-06-01 and will be fully unsupported by 2025-06-30](https://github.com/actions/runner-images/issues/12045) |
| [Windows Server 2025 is now available](https://github.com/actions/runner-images/issues/11228) |
***
# Windows Server 2025
- OS Version: 10.0.26100 Build 4349
Expand Down Expand Up @@ -512,4 +512,3 @@ Note: MSYS2 is pre-installed on image but not added to PATH.
| ANDROID_NDK_LATEST_HOME | C:\Android\android-sdk\ndk\28.1.13356709 |
| ANDROID_NDK_ROOT | C:\Android\android-sdk\ndk\27.2.12479018 |
| ANDROID_SDK_ROOT | C:\Android\android-sdk |

8 changes: 2 additions & 6 deletions images/windows/scripts/build/Configure-ImageDataFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## File: Configure-ImageDataFile.ps1
## Desc: Creates a JSON file with information about the image
################################################################################

Import-Module ImageHelpers
$os = Get-CimInstance -ClassName Win32_OperatingSystem
$caption = $os.Caption
$osName = $caption.Substring(0, $caption.LastIndexOf(" "))
Expand All @@ -23,12 +23,8 @@ if (Test-IsWin25) {
$imageLabel = "windows-2022"
$softwareUrl = "${githubUrl}/win22/$imageMajorVersion.$imageMinorVersion/images/windows/Windows2022-Readme.md"
$releaseUrl = "https://github.com/actions/runner-images/releases/tag/win22%2F$imageMajorVersion.$imageMinorVersion"
} elseif (Test-IsWin19) {
$imageLabel = "windows-2019"
$softwareUrl = "${githubUrl}/win19/$imageMajorVersion.$imageMinorVersion/images/windows/Windows2019-Readme.md"
$releaseUrl = "https://github.com/actions/runner-images/releases/tag/win19%2F$imageMajorVersion.$imageMinorVersion"
} else {
throw "Invalid platform version is found. Either Windows Server 2019, 2022 or 2025 are required"
throw "Invalid platform version is found. Either Windows Server 2022 or 2025 are required"
}

$json = @"
Expand Down
27 changes: 0 additions & 27 deletions images/windows/scripts/build/Install-BizTalkBuildComponent.ps1

This file was deleted.

85 changes: 27 additions & 58 deletions images/windows/scripts/build/Install-Mingw64.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,68 +3,37 @@
## Desc: Install GNU tools for Windows
################################################################################

if (Test-IsWin19) {
# If Windows 2019, install version 8.1.0 form sourceforge
$baseUrl = "https://download.qt.io/development_releases/prebuilt"

$("mingw32", "mingw64") | ForEach-Object {
if ($_ -eq "mingw32") {
$url = "$baseUrl/mingw_32/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z"
$sha256sum = 'adb84b70094c0225dd30187ff995e311d19424b1eb8f60934c60e4903297f946'
} elseif ($_ -eq "mingw64") {
$url = "$baseUrl/mingw_64/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z"
$sha256sum = '853970527b5de4a55ec8ca4d3fd732c00ae1c69974cc930c82604396d43e79f8'
} else {
throw "Unknown architecture $_"
}

$packagePath = Invoke-DownloadWithRetry $url
Test-FileChecksum -Path $packagePath -ExpectedSHA256Sum $sha256sum
Expand-7ZipArchive -Path $packagePath -DestinationPath "C:\"

# Make a copy of mingw-make.exe to make.exe, which is a more discoverable name
# and so the same command line can be used on Windows as on macOS and Linux
$path = "C:\$_\bin\mingw32-make.exe" | Get-Item
Copy-Item -Path $path -Destination (Join-Path $path.Directory 'make.exe')
# If Windows 2022 or 2025 install version specified in the toolset
$version = (Get-ToolsetContent).mingw.version
$runtime = (Get-ToolsetContent).mingw.runtime

$("mingw32", "mingw64") | ForEach-Object {
if ($_ -eq "mingw32") {
$arch = "i686"
$threads = "posix"
$exceptions = "dwarf"
} elseif ($_ -eq "mingw64") {
$arch = "x86_64"
$threads = "posix"
$exceptions = "seh"
} else {
throw "Unknown architecture $_"
}

Add-MachinePathItem "C:\mingw64\bin"

}

if (-not (Test-IsWin19)) {
# If Windows 2022 0r 2025 install version specified in the toolset
$version = (Get-ToolsetContent).mingw.version
$runtime = (Get-ToolsetContent).mingw.runtime
$url = Resolve-GithubReleaseAssetUrl `
-Repo "niXman/mingw-builds-binaries" `
-Version "$version" `
-Asset "$arch-*-release-$threads-$exceptions-$runtime-*.7z"

$("mingw32", "mingw64") | ForEach-Object {
if ($_ -eq "mingw32") {
$arch = "i686"
$threads = "posix"
$exceptions = "dwarf"
} elseif ($_ -eq "mingw64") {
$arch = "x86_64"
$threads = "posix"
$exceptions = "seh"
} else {
throw "Unknown architecture $_"
}
$packagePath = Invoke-DownloadWithRetry $url
Expand-7ZipArchive -Path $packagePath -DestinationPath "C:\"

$url = Resolve-GithubReleaseAssetUrl `
-Repo "niXman/mingw-builds-binaries" `
-Version "$version" `
-Asset "$arch-*-release-$threads-$exceptions-$runtime-*.7z"

$packagePath = Invoke-DownloadWithRetry $url
Expand-7ZipArchive -Path $packagePath -DestinationPath "C:\"

# Make a copy of mingw-make.exe to make.exe, which is a more discoverable name
# and so the same command line can be used on Windows as on macOS and Linux
$path = "C:\$_\bin\mingw32-make.exe" | Get-Item
Copy-Item -Path $path -Destination (Join-Path $path.Directory 'make.exe')
}

Add-MachinePathItem "C:\mingw64\bin"
# Make a copy of mingw-make.exe to make.exe, which is a more discoverable name
# and so the same command line can be used on Windows as on macOS and Linux
$path = "C:\$_\bin\mingw32-make.exe" | Get-Item
Copy-Item -Path $path -Destination (Join-Path $path.Directory 'make.exe')
}

Add-MachinePathItem "C:\mingw64\bin"

Invoke-PesterTests -TestFile "Tools" -TestName "Mingw64"
25 changes: 2 additions & 23 deletions images/windows/scripts/build/Install-VisualStudio.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
################################################################################
$vsToolset = (Get-ToolsetContent).visualStudio

if (Test-IsWin19) {
# Install Visual Studio for Windows 19
Install-VisualStudio `
-Version $vsToolset.subversion `
-Edition $vsToolset.edition `
-Channel $vsToolset.channel `
-RequiredComponents $vsToolset.workloads `
-ExtraArgs "--allWorkloads --includeRecommended --remove Component.CPython3.x64"
}


if ( (Test-IsWin22) -or (Test-IsWin25) ) {
# Install Visual Studio for Windows 22 and 25 with InstallChannel
Expand All @@ -39,19 +31,6 @@ $vsInstallRoot = (Get-VisualStudioInstance).InstallationPath
$newContent = '{"Extensions":[{"Key":"1e906ff5-9da8-4091-a299-5c253c55fdc9","Value":{"ShouldAutoUpdate":false}},{"Key":"Microsoft.VisualStudio.Web.AzureFunctions","Value":{"ShouldAutoUpdate":false}}],"ShouldAutoUpdate":false,"ShouldCheckForUpdates":false}'
Set-Content -Path "$vsInstallRoot\Common7\IDE\Extensions\MachineState.json" -Value $newContent

if (Test-IsWin19) {
# Install Windows 10 SDK version 10.0.14393.795
Install-Binary -Type EXE `
-Url 'https://go.microsoft.com/fwlink/p/?LinkId=838916' `
-InstallArgs @("/q", "/norestart", "/ceip off", "/features OptionId.WindowsSoftwareDevelopmentKit") `
-ExpectedSubject 'CN=Microsoft Corporation, OU=MOPR, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'

# Install Windows 11 SDK version 10.0.22621.0
Install-Binary -Type EXE `
-Url 'https://go.microsoft.com/fwlink/p/?linkid=2196241' `
-InstallArgs @("/q", "/norestart", "/ceip off", "/features OptionId.UWPManaged OptionId.UWPCPP OptionId.UWPLocalized OptionId.DesktopCPPx86 OptionId.DesktopCPPx64 OptionId.DesktopCPParm64") `
-ExpectedSubject $(Get-MicrosoftPublisher)
}

if (Test-IsWin22) {
# Install Windows 10 SDK version 10.0.17763
Expand All @@ -61,7 +40,7 @@ if (Test-IsWin22) {
-ExpectedSubject $(Get-MicrosoftPublisher)
}

if (-not (Test-IsWin19)) {
if ( (Test-IsWin22) -or (Test-IsWin25)) {
# Install Windows 11 SDK version 10.0.26100
Install-Binary -Type EXE `
-Url 'https://go.microsoft.com/fwlink/?linkid=2286561' `
Expand Down
Loading