-
-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (28 loc) · 918 Bytes
/
cleanup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Cleanup
on:
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
env:
package_name: run-script
jobs:
gpr:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/[email protected]
- name: Get project version
id: project
run: |
_version="$(jq -r '.tools."${{ env.package_name }}".version' ./.config/dotnet-tools.json)"
_version="${_version//'.'/'\.'}"
_version="^${_version}\$"
echo "version=${_version}" >> $GITHUB_OUTPUT
# Keep the last 13 versions as well as the version used by the project itself
- uses: actions/[email protected]
with:
package-name: ${{ env.package_name }}
package-type: nuget
delete-only-pre-release-versions: true
min-versions-to-keep: 13
ignore-versions: ${{ steps.project.outputs.version }}