Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/frankdejonge/use-container-cleanup


https://github.com/frankdejonge/use-container-cleanup

Last synced: 3 days ago
JSON representation

Awesome Lists containing this project

README

        

# Action to clean up containers from ghcr.io

This action old deleted docker containers hosted on ghcr.io. The action expects
containers to have incremental numeric semver-like tags. Any version that can be coerced
to a semver version works (e.g. `1.2` or `2.3.4`).

For tagging of containers I use tags formatted as `.${{ github.run_number }}`.

## Example workflow

```yaml
name: Clean up Container Images

on:
push:
branches: [main]
paths:
- .github/workflows/cleanup-containers.yml
workflow_run:
workflows: ["Build Docker Images"]
branches: [main]
types:
- completed

jobs:
clean-up:
runs-on: ubuntu-latest
steps:
uses: frankdejonge/[email protected]
with:
package:
versions:
token: ${{ secrets.GITHUB_TOKEN }}
```