Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions .github/workflows/reusable-clean-containers.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
name: Reusable container image cleanup
on:
workflow_call:
inputs:
package-name:
type: string
required: true
description: |
name of package/container to remove
starts with repository name e.g. base-images/centos
ignored-regex:
type: string
required: true
description: |
regex which is applied against image tags to ignore/keep those versions
number-kept:
type: number
required: true
default: 3
description: |
number of untagged versions to keep in package history
inputs:
package-name:
type: string
required: true
description: |
name of package/container to remove
starts with repository name e.g. base-images/centos
ignored-regex:
type: string
required: false
default: "^$"
description: |
optional regex which is applied against image name. The default matches nothing, so no versions are ignored
number-kept:
type: number
required: true
default: 3
description: |
number of untagged versions to keep in package history
jobs:
clean:
runs-on: ubuntu-latest
Expand All @@ -29,8 +30,8 @@ jobs:
exit 1
- uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 #v5.0.0
with:
# Can be a single package version id, or a comma separated list of package version ids.
# Defaults to an empty string.
# Can be a single package version id, or a comma separated list of package version ids.
# Defaults to an empty string.
ignore-versions: ${{ inputs.ignored-regex }}
# Owner of the package.
# Defaults to the owner of the repo executing the workflow.
Expand Down
Loading