Skip to content
Merged
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
16 changes: 15 additions & 1 deletion .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe have a verbose message when the variable is set to false

} else {
Write-Verbose "No difference found. Not creating a PR." -Verbose
}
Comment thread
TravisEz13 marked this conversation as resolved.
Resolved
- 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 <noreply@github.com>
Expand Down