Skip to content

Commit

Permalink
added test regs github action to validate regs merges
Browse files Browse the repository at this point in the history
  • Loading branch information
YoraiLevi committed Sep 20, 2023
1 parent be3061d commit 3559bca
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/test_regs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ on:
- master

jobs:
# build:
# runs-on: windows-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# - name: Test PowerShell script
# shell: powershell
# run: |
# # Run PowerShell script here

test:
runs-on: windows-latest
steps:
Expand All @@ -25,16 +15,22 @@ jobs:
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
- name: Setup PowerShell Core
uses: microsoft/setup-powershell@v1
with:
pwsh-version: '7.1'
- name: Checkout repository

uses: actions/checkout@v2
- name: Create reg-merge-results directory
run: New-Item -ItemType Directory -Path reg-merge-results
- name: Test reg merge
shell: powershell
shell: pwsh
run: |
$ErrorActionPreference = "SilentlyContinue"
$regFiles = Get-ChildItem -Path . -Filter *.reg -Recurse
foreach ($regFile in $regFiles) {
$output = reg import $regFile.FullName 2>&1
$output = cmd /c "reg import $regFile.FullName 2>&1"
if ($output -like "*The operation completed successfully.*") {
New-Item -ItemType File -Path "reg-merge-results\$($regFile.Name).pass"
} else {
Expand Down

0 comments on commit 3559bca

Please sign in to comment.