Skip to content

Commit

Permalink
Allow running for specific owner and skip global stats
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Sep 28, 2024
1 parent c07e796 commit 52c9adf
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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: |
Expand Down

0 comments on commit 52c9adf

Please sign in to comment.