File tree Expand file tree Collapse file tree 3 files changed +36
-9
lines changed
Expand file tree Collapse file tree 3 files changed +36
-9
lines changed Original file line number Diff line number Diff line change 1+ name : Cleanup main images
2+
3+ on :
4+ schedule :
5+ - cron : " 5 * * * *"
6+ workflow_dispatch :
7+
8+ env :
9+ REGISTRY : ghcr.io/openmcp-project
10+ IMAGE_NAME : mcp-ui-frontend
11+ KEEP_X_IMAGES : 5
12+
13+ jobs :
14+ clean :
15+ name : " Clean main images"
16+ runs-on : ubuntu-latest
17+ permissions :
18+ packages : write
19+ steps :
20+ - name : Delete old main branch images
21+ uses : actions/delete-package-versions@v5
22+ with :
23+ package-name : ${{ env.IMAGE_NAME }}
24+ package-type : " container"
25+ min-versions-to-keep : ${{ env.KEEP_X_IMAGES }}
26+ # Ignore any version that does NOT start with 'main-'
27+ ignore-versions : " ^(?!main-).*$"
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ jobs:
3030
3131 - name : Docker meta
3232 id : meta
33- uses : docker/metadata-action@v5
33+ uses : docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5
3434 with :
3535 images : ${{env.REGISTRY}}/${{env.IMAGE_NAME}}
3636 tags : |
37- type=sha,prefix ={{branch}}-
37+ type=raw,value ={{branch}}-{{date 'YYYYMMDDHHmmss'}}
3838
3939 - name : Log in to the Container registry
4040 uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
5050 uses : docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
5151
5252 - name : Build and push
53- uses : docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16 .0
53+ uses : docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17 .0
5454 with :
5555 context : .
5656 platforms : linux/amd64,linux/arm64
You can’t perform that action at this time.
0 commit comments