Skip to content

Commit

Permalink
chore: Add workflows to clean up docker tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mircea-pavel-anton committed Aug 18, 2024
1 parent 53afbfd commit 604386a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/docker-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Docker Cleanup

on:
pull_request:
types: ["closed"]

jobs:
cleanup:
secrets: inherit
uses: mirceanton/reusable-workflows/.github/workflows/docker-cleanup.yaml@main
with:
image-name: ${{ github.event.repository.name }}
delete-untagged: true
dry-run: false
24 changes: 24 additions & 0 deletions .github/workflows/docker-delete-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Docker Delete Tag

on:
workflow_dispatch:
inputs:
tag:
description: "Tag to delete"
required: true
default: "latest"
dry-run:
description: "Dry run"
required: false
default: "true"

jobs:
delete:
uses: mirceanton/reusable-workflows/.github/workflows/docker-delete.yaml@main
secrets: inherit
with:
image-name: ${{ github.event.repository.name }}
tag: ${{ github.event.inputs.tag }}
dry-run: ${{ github.event.inputs.dry-run }}

0 comments on commit 604386a

Please sign in to comment.