From d7a29712dd68dcc78aea1ea64e1f55a682afc480 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Sat, 28 Sep 2024 17:11:17 -0300 Subject: [PATCH] Allow running for specific owner and skip global stats --- .github/workflows/nuget.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml index 748484c..bda81bf 100644 --- a/.github/workflows/nuget.yml +++ b/.github/workflows/nuget.yml @@ -1,6 +1,17 @@ name: nuget on: workflow_dispatch: + inputs: + global: + type: choice + description: Collect General Stats + required: true + options: + - $true + - $false + owner: + description: Collect Specific Owner Stats + schedule: - cron: "0 2 1-7 * 6" @@ -26,11 +37,16 @@ jobs: run: | dotnet tool update -g dotnet-sponsor $owners = gc owners.json | convertfrom-json + if ('${{ github.event.inputs.owner }}') { + $owners = @('${{ github.event.inputs.owner }}') + } foreach ($owner in $owners) { '${{ secrets.DEVLOOPED_TOKEN }}' | sponsor nuget --tos --exceptions --oss-only false --with-token --force --owner $owner } # global stats for all packages - '${{ secrets.DEVLOOPED_TOKEN }}' | sponsor nuget --tos --exceptions --force --with-token + if (${{ github.event.inputs.global || '$true' }}) { + '${{ secrets.DEVLOOPED_TOKEN }}' | sponsor nuget --tos --exceptions --force --with-token + } - name: ⬆️ commit run: |