Skip to content

Commit 8df79a2

Browse files
CopilotGcayaCopilot
authored
Change the CI workflow to use the shared az-artifact-authenticate step (#121)
* Initial plan * Initial setup and analysis of repository state Co-authored-by: Gcaya <8711024+Gcaya@users.noreply.github.com> * Replace PAT-based auth with az-artifact-authenticate step - Replace secret retrieval step with az-artifact-authenticate action - Remove setup-dotnet step (included in az-artifact-authenticate) - Add VSS_NUGET_ACCESSTOKEN support to Build.ps1 - Remove NUGET_API_KEY environment variable from CI Co-authored-by: Gcaya <8711024+Gcaya@users.noreply.github.com> * Update az-artifact-authenticate to use variables parameter Co-authored-by: Gcaya <8711024+Gcaya@users.noreply.github.com> * Simplify variables parameter using toJSON(vars) Co-authored-by: Gcaya <8711024+Gcaya@users.noreply.github.com> * Update Build.ps1 Co-authored-by: Copilot <175728472+Copilot@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> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3ae70ef commit 8df79a2

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,11 @@ jobs:
3030
with:
3131
fetch-depth: 0
3232

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

4939
- name: Install Mono
5040
shell: bash
@@ -58,7 +48,6 @@ jobs:
5848
shell: pwsh
5949
env:
6050
NUGET_SOURCE: ${{ vars.GSOFTDEV_NUGET_SOURCE }}
61-
NUGET_API_KEY: ${{ steps.get_gsoft_nuget_feed_secret.outputs.secret }}
6251

6352
linearb:
6453
needs: [main]

Build.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ Process {
4040
if (($null -ne $env:NUGET_SOURCE) -and ($null -ne $env:NUGET_API_KEY)) {
4141
Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k $env:NUGET_API_KEY --skip-duplicate }
4242
}
43+
elseif (($null -ne $env:NUGET_SOURCE) -and ($null -ne $env:VSS_NUGET_ACCESSTOKEN)) {
44+
Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k "az-api-key" --skip-duplicate }
45+
}
4346
}
4447
finally {
4548
Pop-Location

0 commit comments

Comments
 (0)