Skip to content

Commit d3a28f8

Browse files
fix: check if nuget source already added
1 parent dac36b7 commit d3a28f8

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/chapter-4-workflow.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,15 @@ jobs:
5555
with:
5656
dotnet-version: 10.0.x
5757
- name: Add Evolutionary Architecture Nuget Source
58-
uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@main
59-
with:
60-
github-token: ${{ secrets.GITHUB_TOKEN }}
61-
owner: ${{ github.repository_owner }}
62-
path: ${{ env.CHAPTER_DIR }}
63-
nuget-source-name: ${{ env.NUGET_SOURCE_NAME }}
58+
run: |
59+
if ! dotnet nuget list source | grep -q "${{ env.NUGET_SOURCE_NAME }}"; then
60+
dotnet nuget add source \
61+
https://nuget.pkg.github.com/${{ inputs.owner }}/index.json \
62+
--name ${{ env.NUGET_SOURCE_NAME }} \
63+
--username ${{ github.actor }} \
64+
--password ${{ inputs.github-token }} \
65+
--store-password-in-clear-text
66+
fi
6467
6568
- name: Restore dependencies
6669
run: dotnet restore

0 commit comments

Comments
 (0)