Skip to content

Commit d8f49a5

Browse files
authored
Merge pull request #9 from geany/ci_image_cleanup
CI: Add workflow to cleanup old untagged CI container image versions
2 parents 9fe8454 + 2331861 commit d8f49a5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# Copyright: 2023, The Geany contributors
3+
# License: GNU GPL v2 or later
4+
5+
name: Build CI Docker Images
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
# Run weekly on Friday
11+
- cron: '34 7 * * FRI'
12+
13+
jobs:
14+
cleanup:
15+
name: Remove all but the latest $PACKAGES_TO_KEEP untagged versions of the Geany CI Docker image
16+
runs-on: ubuntu-22.04
17+
permissions:
18+
packages: write
19+
20+
env:
21+
PACKAGES_TO_KEEP: 5
22+
DOCKER_IMAGE_NAME: "geany-mingw64-ci"
23+
24+
steps:
25+
- uses: actions/delete-package-versions@v4
26+
with:
27+
package-name: ${{ env.DOCKER_IMAGE_NAME }}
28+
package-type: 'container'
29+
min-versions-to-keep: ${{ env.PACKAGES_TO_KEEP }}
30+
delete-only-untagged-versions: 'true'

0 commit comments

Comments
 (0)