forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add current folder to the beginning of the module import (PowerShell#…
…16353) * fix module import * capture git status for notices wf * Only create a pr if there is a diff * Update .github/workflows/daily.yml
- Loading branch information
1 parent
00d39fa
commit 2f7f67d
Showing
1 changed file
with
15 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
git fetch --prune --unshallow --tags | ||
- name: Execute Update .NET script | ||
run: | | ||
Import-Module .github/workflows/GHWorkflowHelper | ||
Import-Module ./.github/workflows/GHWorkflowHelper | ||
$currentVersion = (Get-Content .\global.json | ConvertFrom-Json).sdk.version | ||
Set-GWVariable -Name OLD_VERSION -Value $currentVersion | ||
|
@@ -67,9 +67,23 @@ jobs: | |
- name: Update Notices file | ||
run: | | ||
Invoke-WebRequest -Uri https://aka.ms/pwsh-daily-tpn -OutFile ./ThirdPartyNotices.txt | ||
- name: Capture Git Status | ||
run: | | ||
git status --short | ||
- name: Check if we need to create a PR | ||
run: | | ||
git diff --quiet ThirdPartyNotices.txt | ||
$exitCode = $LASTEXITCODE | ||
Write-Verbose -Message "Exit code: $exitCode" -Verbose | ||
if ($LASTEXITCODE -ne 0) { | ||
Set-GWVariable -Name CREATE_PR -Value 'true' | ||
} else { | ||
Write-Verbose "No difference found. Not creating a PR." -Verbose | ||
} | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
id: cprtpn | ||
if: env.CREATE_PR == 'true' | ||
with: | ||
commit-message: "Update to the latest notice file" | ||
committer: GitHub <[email protected]> | ||
|