Skip to content

Commit c333263

Browse files
authored
Merge pull request #134 from datastax/CDM-45
Automatically clean-up older maven packages
2 parents 30d8495 + daedd4f commit c333263

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

.github/workflows/maven-publish.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Maven Package
66
on:
77
workflow_dispatch:
88
push:
9-
branches: [ main ]
9+
branches: [ main, 3.3.0_stable ]
1010

1111
jobs:
1212
build:
@@ -33,3 +33,25 @@ jobs:
3333
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
3434
env:
3535
GITHUB_TOKEN: ${{ github.token }}
36+
37+
# This following step deletes older maven packages to help automatic clean-up
38+
# For more information, see https://github.com/marketplace/actions/delete-package-versions#delete-all-except-y-latest-versions-of-a-package
39+
40+
cleanup-old-maven-packages:
41+
name: Clean-up old maven packages
42+
needs: [ build ]
43+
runs-on: ubuntu-latest
44+
45+
# max run time 20 minutes
46+
timeout-minutes: 20
47+
48+
strategy:
49+
matrix:
50+
package: [ datastax.astra.migrate.cassandra-data-migrator, datastax.cdm.cassandra-data-migrator ]
51+
52+
steps:
53+
- uses: actions/delete-package-versions@v4
54+
with:
55+
package-name: ${{ matrix.package }}
56+
package-type: 'maven'
57+
min-versions-to-keep: 10

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ target/
55
dependency-reduced-pom.xml
66
.idea/*
77
cassandra-data-migrator.iml
8+
*/DS_Store

0 commit comments

Comments
 (0)