Skip to content

Commit

Permalink
add workflow to cleanup unused images on dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
philiplehmann committed Jul 1, 2024
1 parent f0b736f commit a49d6ce
Showing 1 changed file with 114 additions and 0 deletions.
114 changes: 114 additions & 0 deletions .github/workflows/docker-hub-retention.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: docker-hub-retention

on:
schedule:
- cron: "0 2 * * 1"
workflow_dispatch:

jobs:
dependencies:
runs-on: [ubuntu-latest]
steps:
- name: mailcatcher
uses: philiplehmann/docker-hub-retention
with:
repository: philiplehmann/mailcatcher
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
multiple: |
- match: ([0-9\.]+)-([0-9]+)
retention: 6m
- match: build-cache.*
retention: 14d
dryrun: "true"

- name: maildev
uses: philiplehmann/docker-hub-retention
with:
repository: philiplehmann/maildev
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
multiple: |
- match: ([0-9\.]+)-([0-9]+)
retention: 6m
- match: build-cache.*
retention: 14d
dryrun: "true"

- name: mailhog
uses: philiplehmann/docker-hub-retention
with:
repository: philiplehmann/mailhog
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
multiple: |
- match: ([0-9\.]+)-([0-9]+)
retention: 6m
- match: build-cache.*
retention: 14d
dryrun: "true"

- name: pdftk
uses: philiplehmann/docker-hub-retention
with:
repository: philiplehmann/pdftk
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
multiple: |
- match: ([0-9\.]+)-([0-9]+)
retention: 6m
- match: build-cache.*
retention: 14d
dryrun: "true"

- name: poppler
uses: philiplehmann/docker-hub-retention
with:
repository: philiplehmann/poppler
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
multiple: |
- match: ([0-9\.]+)-([0-9]+)
retention: 6m
- match: build-cache.*
retention: 14d
dryrun: "true"

- name: puppeteer
uses: philiplehmann/docker-hub-retention
with:
repository: philiplehmann/puppeteer
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
multiple: |
- match: ([0-9\.]+)-([0-9]+)
retention: 6m
- match: build-cache.*
retention: 14d
dryrun: "true"

- name: tesseract
uses: philiplehmann/docker-hub-retention
with:
repository: philiplehmann/tesseract
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
multiple: |
- match: ([0-9\.]+)-([0-9]+)
retention: 6m
- match: build-cache.*
retention: 14d
dryrun: "true"

- name: unoserver
uses: philiplehmann/docker-hub-retention
with:
repository: philiplehmann/unoserver
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
multiple: |
- match: ([0-9\.]+)-([0-9]+)
retention: 6m
- match: build-cache.*
retention: 14d
dryrun: "true"

0 comments on commit a49d6ce

Please sign in to comment.