diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7423d01..d286eaf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -87,6 +87,8 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 + with: + ref: "refs/pull/${{ github.event.number }}/merge" - name: Create License File run: | @@ -141,6 +143,8 @@ jobs: steps: - name: Check out code uses: actions/checkout@v4 + with: + ref: "refs/pull/${{ github.event.number }}/merge" - name: Login to Azure uses: azure/login@v2 diff --git a/Start-C4bJenkinsSetup.ps1 b/Start-C4bJenkinsSetup.ps1 index 76cf5eb..f643827 100644 --- a/Start-C4bJenkinsSetup.ps1 +++ b/Start-C4bJenkinsSetup.ps1 @@ -14,7 +14,10 @@ param( [string]$HostName = $env:ComputerName, # API key of your Nexus repo, for Chocolatey Jenkins jobs to use - [string]$NuGetApiKey = $(Get-ChocoEnvironmentProperty NuGetApiKey -AsPlainText) + [string]$NuGetApiKey = $( + if (-not (Get-Command Get-ChocoEnvironmentProperty -ErrorAction SilentlyContinue)) {. $PSScriptRoot\scripts\Get-Helpers.ps1} + Get-ChocoEnvironmentProperty NuGetApiKey -AsPlainText + ) ) process { $DefaultEap = $ErrorActionPreference