Skip to content

Commit

Permalink
Fix upload path and add package cleanup policy
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Chang <[email protected]>
  • Loading branch information
mocsharp committed Sep 12, 2023
1 parent e44c16e commit 4bf0cb1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@ jobs:
popd
dir -r ~/release
- name: Upload CLI
uses: actions/[email protected]
with:
name: artifacts
path: ~/release
retention-days: 7

- name: Package API
env:
PACKAGEDIR: '${{ github.workspace }}/nupkg/'
Expand All @@ -392,22 +399,13 @@ jobs:
dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ env.NUGETVER }}
ls -lR $PACKAGEDIR
working-directory: ./src/Api

- name: Upload CLI
uses: actions/[email protected]
with:
name: artifacts
path: ~/release
retention-days: 7

- name: Upload Nuget
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/[email protected]
env:
PACKAGEDIR: '${{ github.workspace }}/nupkg'
with:
name: nuget
path: $PACKAGEDIR/*.nupkg
path: ~/nupkg
retention-days: 30

- name: Log in to the Container registry
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/package-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Cleanup Pre-release Packages

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/delete-package-versions@v4
name: Monai.Deploy.InformaticsGateway.Api
with:
package-name: 'Monai.Deploy.InformaticsGateway.Api'
package-type: nuget
min-versions-to-keep: 10
delete-only-pre-release-versions: "true"

- uses: actions/delete-package-versions@v4
name: monai-deploy-informatics-gateway
with:
package-name: 'monai-deploy-informatics-gateway'
package-type: container
min-versions-to-keep: 10
delete-only-pre-release-versions: "true"

0 comments on commit 4bf0cb1

Please sign in to comment.