-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: split windows-specific setups into private composite action
Moves all the Windows junk out of the way, where it can be encapsulated. Signed-off-by: Austin Seipp <[email protected]>
- Loading branch information
1 parent
3fe0dd5
commit 64ae60d
Showing
2 changed files
with
35 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Configure Windows Builders | ||
description: | | ||
This action configures the Windows builders to run tests. | ||
runs: | ||
using: "composite" | ||
steps: | ||
# The default version of gpg installed on the runners is a version baked in with git | ||
# which only contains the components needed by git and doesn't work for our test cases. | ||
# | ||
# This installs the latest gpg4win version, which is a variation of GnuPG built for | ||
# Windows. | ||
# | ||
# There is some issue with windows PATH max length which is what all the PATH wrangling | ||
# below is for. Please see the below link for where this fix was derived from: | ||
# https://github.com/orgs/community/discussions/24933 | ||
- name: Setup GnuPG [windows] | ||
if: startsWith(matrix.os, 'windows') | ||
shell: pwsh | ||
run: | | ||
$env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin" | ||
[Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine") | ||
choco install --yes gpg4win | ||
echo "C:\Program Files (x86)\Gpg4win\..\GnuPG\bin" >> $env:GITHUB_PATH | ||
# The default version of openssh on windows server is quite old (8.1) and doesn't have | ||
# all the necessary signing/verification commands available (such as -Y find-principals) | ||
- name: Setup ssh-agent [windows] | ||
if: startsWith(matrix.os, 'windows') | ||
shell: pwsh | ||
run: | | ||
Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | ||
Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 | ||
choco install openssh --pre |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters