diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index bd1a352d0f36..5f7cbbfddb54 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -71,10 +71,54 @@ jobs: uses: peter-evans/create-pull-request@v3 id: cprtpn with: - commit-message: "Update to the latest notice file" + commit-message: "Update to the latest NOTICES file" committer: GitHub author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> - title: "Update to the latest notice file" + title: "Update to the latest NOTICES file" + reviewers: travisez13 + base: master + draft: false + branch: update-cgmanifest + update-cgmanifest: + name: Update cgmanifest + timeout-minutes: 15 + runs-on: windows-latest + if: github.repository == 'PowerShell/PowerShell' + env: + CGMANIFEST_PATH: '' + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Sync tags + run: | + git fetch --prune --unshallow --tags + - name: Install Ships provider to deal with project.assets.json + run: | + Install-Module -Name dotnet.project.assets -force + - name: Bootstrap + run: | + Import-Module ./build.psm1 + Start-PSBootStrap + - name: Verify cgmanifest is up to date + run: | + Import-Module ./build.psm1 + Find-Dotnet + ./tools/findMissingNotices.ps1 -Fix + - name: Upload cgmanifest + uses: actions/upload-artifact@v2 + if: always() && env.CGMANIFEST_PATH != '' + with: + name: cgmanifest + path: ${{ env.CGMANIFEST_PATH }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + id: cprcgmanifest + if: env.CGMANIFEST_PATH != '' + with: + commit-message: "Update the cgmanifest" + committer: GitHub + author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> + title: "Update the cgmanifest" reviewers: travisez13 base: master draft: false diff --git a/.github/workflows/update-cgmanifest.yml b/.github/workflows/update-cgmanifest.yml deleted file mode 100644 index 13c3bada2433..000000000000 --- a/.github/workflows/update-cgmanifest.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. - -name: Update cgmanifest -on: - workflow_dispatch: - pull_request: - branches: - - master - -defaults: - run: - shell: pwsh - -env: - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - POWERSHELL_TELEMETRY_OPTOUT: 1 - CGMANIFEST_PATH: '' - NUGET_PACKAGES: ${{ github.workspace }}\.nuget\packages - -jobs: - update-cgmanifest: - name: Update cgmanifest - timeout-minutes: 15 - runs-on: windows-latest - if: github.repository == 'PowerShell/PowerShell' - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Cache DotNet - uses: actions/cache@v2 - with: - path: | - ~\AppData\Local\Microsoft\dotnet - ${{ github.workspace }}\.nuget\packages - key: ${{ runner.os }}-${{ hashFiles('**\DotnetRuntimeMetadata.json') }}-${{ hashFiles('**\nuget.config') }} - - name: Sync tags - run: | - git fetch --prune --unshallow --tags - - name: Install Ships provider to deal with project.assets.json - run: | - Install-Module -Name dotnet.project.assets -force - - name: Bootstrap - run: | - Import-Module ./build.psm1 - Start-PSBootStrap - - name: Verify cgmanifest is up to date - run: | - Import-Module ./build.psm1 - Find-Dotnet - ./tools/findMissingNotices.ps1 - - name: Upload cgmanifest - uses: actions/upload-artifact@v2 - if: always() && env.CGMANIFEST_PATH != '' - with: - name: cgmanifest - path: ${{ env.CGMANIFEST_PATH }}