Skip to content

Commit 82df326

Browse files
CopilotGcaya
andauthored
Change CI workflow to use shared az-artifact-authenticate step (#141)
* Initial plan * Initial commit: create feature branch for az-artifact-authenticate integration Co-authored-by: Gcaya <8711024+Gcaya@users.noreply.github.com> * Replace PAT retrieval with az-artifact-authenticate step and update Build.ps1 Co-authored-by: Gcaya <8711024+Gcaya@users.noreply.github.com> * Update Build.ps1 * Change feed-url to use vars.GSOFTDEV_NUGET_SOURCE instead of secrets.NUGET_GSOFTDEV_FEED_URL Co-authored-by: Gcaya <8711024+Gcaya@users.noreply.github.com> * Change NUGET_SOURCE to use vars.GSOFTDEV_NUGET_SOURCE instead of secrets.NUGET_GSOFTDEV_FEED_URL Co-authored-by: Gcaya <8711024+Gcaya@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Gcaya <8711024+Gcaya@users.noreply.github.com> Co-authored-by: Guillaume Caya-Letourneau <guillaume.caya.letourneau@gmail.com>
1 parent 14d52b5 commit 82df326

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,11 @@ jobs:
2929
with:
3030
fetch-depth: 0
3131

32-
- name: Get gsoft-nuget-feed secret
33-
id: get_gsoft_nuget_feed_secret
34-
uses: workleap/wl-reusable-workflows/retrieve-managed-secret@main
32+
- name: Authenticate to Azure Artifacts
33+
uses: workleap/wl-reusable-workflows/az-artifact-authenticate@main
3534
with:
36-
azure-client-id: ${{ vars.AZURE_CLIENT_ID }}
37-
azure-tenant-id: ${{ vars.AZURE_TENANT_ID }}
38-
azure-subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
39-
keyvault-name: ${{ vars.IDP_CICD_KEYVAULT_NAME }}
40-
secret-name: "gsoft-nuget-feed-ado-pat"
41-
42-
- uses: actions/setup-dotnet@v4
43-
with:
44-
source-url: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }}
45-
env:
46-
NUGET_AUTH_TOKEN: ${{ steps.get_gsoft_nuget_feed_secret.outputs.secret }}
35+
feed-url: ${{ vars.GSOFTDEV_NUGET_SOURCE }}
36+
variables: ${{ toJSON(vars) }}
4737

4838
- uses: actions/setup-dotnet@v4
4939
with:
@@ -52,8 +42,7 @@ jobs:
5242
- run: ./Build.ps1
5343
shell: pwsh
5444
env:
55-
NUGET_SOURCE: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }}
56-
NUGET_API_KEY: ${{ steps.get_gsoft_nuget_feed_secret.outputs.secret }}
45+
NUGET_SOURCE: ${{ vars.GSOFTDEV_NUGET_SOURCE }}
5746

5847
linearb:
5948
needs: [ci]

Build.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Process {
2828
if (($null -ne $env:NUGET_SOURCE ) -and ($null -ne $env:NUGET_API_KEY)) {
2929
Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k $env:NUGET_API_KEY --skip-duplicate }
3030
}
31+
elseif (($null -ne $env:NUGET_SOURCE) -and ($null -ne $env:VSS_NUGET_ACCESSTOKEN)) {
32+
Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k "az-api-key" --skip-duplicate }
33+
}
3134
}
3235
finally {
3336
Pop-Location

0 commit comments

Comments
 (0)