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 d662dd1
Show file tree
Hide file tree
Showing 2 changed files with 41 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
25 changes: 25 additions & 0 deletions .github/workflows/docker-delete-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# 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:
type: number
description: "Dry run"
required: true
default: 1

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

0 comments on commit d662dd1

Please sign in to comment.