File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Cleanup
2
+
3
+ on : [push]
4
+
5
+ env :
6
+ CI_COMMIT_REF_NAME : ${{ github.ref_name }}
7
+
8
+ jobs :
9
+ cleanup :
10
+ runs-on : ubuntu-latest
11
+ name : Cleanup images
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+
15
+ - uses : deckhouse/modules-actions/setup@main
16
+ with :
17
+ registry : ghcr.io
18
+ registry_login : ${{ github.actor }}
19
+ registry_password : ${{ secrets.GITHUB_TOKEN }}
20
+
21
+ - name : Get the repository name
22
+ id : repo_name
23
+ run : echo "REPO_NAME=$(echo '${{ github.repository }}' | cut -d'/' -f2)" >> $GITHUB_OUTPUT
24
+
25
+ - uses : deckhouse/modules-actions/cleanup@main
26
+ with :
27
+ module_source : ghcr.io/${{ github.repository_owner }}/modules
28
+ module_name : ${{ steps.repo_name.outputs.REPO_NAME }}
29
+ module_tag : ${{ github.ref_name }}
Original file line number Diff line number Diff line change
1
+ project : echoserver
2
+ configVersion : 1
3
+ cleanup :
4
+ keepPolicies :
5
+ - references :
6
+ branch : /.*/
7
+ limit :
8
+ in : 168h # keep dev images build during last week which not main
9
+ - references :
10
+ branch : /main/
11
+ imagesPerReference :
12
+ last : 5 # keep 5 images for branches main
You can’t perform that action at this time.
0 commit comments