Skip to content

Commit

Permalink
Exclude pushing packages to PR feed if from a fork (won't have secret)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-hawker committed Aug 22, 2023
1 parent af31915 commit a9fdaab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ jobs:
run: ./PackEachExperiment.ps1 -date ${{ env.VERSION_DATE }} -postfix ${{ env.VERSION_PROPERTY }}

# Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config)
- name: Push Pull Request Packages
if: ${{ env.IS_PR == 'true' }}
- name: Push Pull Request Packages (if not fork)
if: ${{ env.IS_PR == 'true' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }}
run: |
dotnet nuget add source https://pkgs.dev.azure.com/dotnet/CommunityToolkit/_packaging/CommunityToolkit-PullRequests/nuget/v3/index.json `
--name PullRequests `
Expand Down Expand Up @@ -232,10 +232,10 @@ jobs:
path: |
${{ github.workspace }}/.github/workflows/SignClientFileList.txt
# if we're not doing a PR build then we upload our packages so we can sign as a separate job.
# if we're not doing a PR build (or it's a PR from a fork) then we upload our packages so we can sign as a separate job or have available to test.
- name: Upload Packages as Artifacts
uses: actions/upload-artifact@v3
if: ${{ env.IS_PR == 'false' }}
if: ${{ env.IS_PR == 'false' || github.event.pull_request.head.repo.full_name != github.repository }}
with:
name: nuget-packages-${{ matrix.platform }}
if-no-files-found: error
Expand Down

0 comments on commit a9fdaab

Please sign in to comment.