Skip to content

Commit 308f7ac

Browse files
authored
Merge branch 'main' into improve-release-action
2 parents c400855 + cc9bec0 commit 308f7ac

File tree

3 files changed

+36
-9
lines changed

3 files changed

+36
-9
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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-).*$"

.github/workflows/main.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
@@ -50,7 +50,7 @@ jobs:
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

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)