Skip to content

Commit

Permalink
Clean up container images on GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
zimmski committed Jan 17, 2025
1 parent 2e703fa commit c44a3eb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ concurrency:
cancel-in-progress: true

jobs:
docker:
name: 'Run docker image building'
container-build:
name: 'Run container image building'
uses: ./.github/workflows/job-docker.yml
container-cleanup:
uses: ./.github/workflows/job-images-cleanup.yml
lint:
name: 'Lint the repository'
uses: ./.github/workflows/job-lint.yml
test:
name: 'Run tests and lint artifacts'
needs:
- docker
- container-build
- lint
secrets: inherit
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/job-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in Github packages
- name: Log in GitHub packages
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/job-images-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
jobs:
delete_unused_container_versions:
runs-on: ubuntu-latest
steps:
- name: Delete container versions
uses: vlaurin/[email protected]
with:
container: eval-dev-quality
dry-run: true
keep-tags-regexes: |
^[1-9]\d*\.\d+.\d+$
keep-younger-than: 14 # In days.
organization: symflower
prune-untagged: true
token: ${{ github.token }}

0 comments on commit c44a3eb

Please sign in to comment.