Skip to content

Commit

Permalink
Fix remaining actions to use repo owner DynamicsValue/fake-xrm-easy#120
Browse files Browse the repository at this point in the history
  • Loading branch information
jordimontana82 committed Feb 4, 2024
1 parent 3e6ce55 commit d1e0859
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 21 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/CI-2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

sonar:
Expand Down Expand Up @@ -83,15 +83,20 @@ jobs:
- name: Enable GitHub packages feed again for build
run: dotnet nuget enable source github

- id: lower-repo-owner
shell: pwsh
run: |
"::set-output name=repo_owner::$($env:GITHUB_REPOSITORY_OWNER.ToLowerInvariant())"
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"DynamicsValue_fake-xrm-easy-abstractions" /o:"dynamicsvalue" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.verbose="true" /d:sonar.qualitygate.wait="true" /d:sonar.cs.opencover.reportsPaths='"coverage/**/coverage.opencover.xml"' /d:sonar.coverage.exclusions='"tests/**/**"'
.\.sonar\scanner\dotnet-sonarscanner begin /k:"${{github.repository_owner}}_fake-xrm-easy-abstractions" /o:"${{ steps.lower-repo-owner.outputs.repo_owner }}" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.verbose="true" /d:sonar.qualitygate.wait="true" /d:sonar.cs.opencover.reportsPaths='"coverage/**/coverage.opencover.xml"' /d:sonar.coverage.exclusions='"tests/**/**"'
.\build.ps1 -configuration FAKE_XRM_EASY_9 -targetFrameworks 'all'
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
Expand All @@ -116,32 +121,32 @@ jobs:
- name: Build
run: pwsh ./build.ps1 -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

- name: Pack Src
run: pwsh ./pack-src.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}"
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

- name: Push Src
run: nuget.exe push .\nupkgs\FakeXrmEasy.Abstractions.*.nupkg -Source ${{ env.source-url }}
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_AUTH_TOKEN: ${{ github.token }}
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Pack Tests
run: pwsh ./pack-tests.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}"
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

- name: Push Tests
run: nuget.exe push .\nupkgs\FakeXrmEasy.AbstractionsTests.*.nupkg -Source ${{ env.source-url }}
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_AUTH_TOKEN: ${{ github.token }}
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/CI-3x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build
run: pwsh ./build.ps1
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

build-windows:
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Build
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

sonar:
Expand All @@ -87,14 +87,19 @@ jobs:
- name: Enable GitHub packages feed
run: dotnet nuget enable source github

- id: lower-repo-owner
shell: pwsh
run: |
"::set-output name=repo_owner::$($env:GITHUB_REPOSITORY_OWNER.ToLowerInvariant())"
- name: Quality Gate
uses: DynamicsValue/dotnet-sonarscanner@v2.3
with:
buildCommand: dotnet build . --configuration 'FAKE_XRM_EASY_9' --framework netcoreapp3.1
testCommand: dotnet test . --configuration 'FAKE_XRM_EASY_9' --framework netcoreapp3.1 --verbosity normal --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage
projectKey: ${{ secrets.SONAR_PROJECT_KEY }}
projectName: fake-xrm-easy-abstractions
sonarOrganisation: dynamicsvalue
sonarOrganisation: ${{ steps.lower-repo-owner.outputs.repo_owner }}
beginArguments: >
/d:sonar.verbose="true"
/d:sonar.qualitygate.wait="true"
Expand All @@ -103,7 +108,7 @@ jobs:
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

pack-push:
Expand All @@ -127,32 +132,32 @@ jobs:
- name: Build
run: pwsh ./build.ps1 -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

- name: Pack Src
run: pwsh ./pack-src.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}"
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

- name: Push Src
run: nuget.exe push .\nupkgs\FakeXrmEasy.Abstractions.*.nupkg -Source ${{ env.source-url }}
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_AUTH_TOKEN: ${{ github.token }}
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Pack Tests
run: pwsh ./pack-tests.ps1 -targetFrameworks 'all' -versionSuffix "zci.${{ github.head_ref }}${{ github.run_number }}"
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.PACKAGES_TOKEN }}

- name: Push Tests
run: nuget.exe push .\nupkgs\FakeXrmEasy.AbstractionsTests.*.nupkg -Source ${{ env.source-url }}
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_AUTH_TOKEN: ${{ github.token }}
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/CI-PullRequest-3x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Build
run: pwsh ./build.ps1
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-net-framework:
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Build
run: pwsh ./build.ps1 -configuration ${{matrix.configuration}} -targetFrameworks 'all'
env:
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}

sonar:
Expand All @@ -87,14 +87,19 @@ jobs:
- name: Enable GitHub packages feed
run: dotnet nuget enable source github

- id: lower-repo-owner
shell: pwsh
run: |
"::set-output name=repo_owner::$($env:GITHUB_REPOSITORY_OWNER.ToLowerInvariant())"
- name: Quality Gate
uses: DynamicsValue/dotnet-sonarscanner@v2.3
with:
buildCommand: dotnet build . --configuration Debug --framework netcoreapp3.1
testCommand: dotnet test . --configuration Debug --framework netcoreapp3.1 --verbosity normal --collect:"XPlat code coverage" --settings tests/.runsettings --results-directory ./coverage
projectKey: ${{ secrets.SONAR_PROJECT_KEY }}
projectName: fake-xrm-easy-abstractions
sonarOrganisation: dynamicsvalue
sonarOrganisation: ${{ steps.lower-repo-owner.outputs.repo_owner }}
beginArguments: >
/d:sonar.verbose="true"
/d:sonar.qualitygate.wait="true"
Expand All @@ -103,7 +108,7 @@ jobs:
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_USERNAME: DynamicsValue
NUGET_USERNAME: ${{github.repository_owner}}
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}


Expand Down

0 comments on commit d1e0859

Please sign in to comment.