Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions .github/workflows/prune-pull-requests-images-tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ on:
permissions: {}
jobs:
prune-pull-requests-images-tags:
uses: hoverkraft-tech/ci-github-container/.github/workflows/prune-pull-requests-images-tags.yml@67e5563d6681bb610c1c961eecb6dfcd5b3cc62f # 0.30.5
uses: hoverkraft-tech/ci-github-container/.github/workflows/prune-pull-requests-images-tags.yml@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6
permissions: {}
with:
# JSON array of runner(s) to use.
Expand All @@ -75,6 +75,11 @@ jobs:
#
# Default: `^pr-([0-9]+)(?:-|$)`
pull-request-tag-filter: ^pr-([0-9]+)(?:-|$)

# Optional regular expression to match tags that should be preserved (not deleted).
# Tags matching this pattern will never be deleted, even if they are on a package version with PR tags.
# Example: "^v.*" to preserve version tags like v1.0.0, v2.1.3, etc.
preserve-tags-filter: ""
````

<!-- usage:end -->
Expand All @@ -95,6 +100,9 @@ jobs:
| | Useful when building image with "registry" cache backend. | | | |
| **`pull-request-tag-filter`** | The regular expression to match pull request tags. | **false** | **string** | `^pr-([0-9]+)(?:-\|$)` |
| | Must have a capture group for the pull request number. | | | |
| **`preserve-tags-filter`** | Optional regular expression to match tags that should be preserved (not deleted). | **false** | **string** | - |
| | Tags matching this pattern will never be deleted, even if they are on a package version with PR tags. | | | |
| | Example: "^v.*" to preserve version tags like v1.0.0, v2.1.3, etc. | | | |

<!-- inputs:end -->
<!-- secrets:start -->
Expand Down Expand Up @@ -125,7 +133,7 @@ This project is licensed under the MIT License.

SPDX-License-Identifier: MIT

Copyright © 2025 hoverkraft-tech
Copyright © 2026 hoverkraft-tech

For more details, see the [license](http://choosealicense.com/licenses/mit/).

Expand Down
12 changes: 10 additions & 2 deletions actions/docker/prune-pull-requests-image-tags/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ permissions:
## Usage

```yaml
- uses: hoverkraft-tech/ci-github-container/actions/docker/prune-pull-requests-image-tags@67e5563d6681bb610c1c961eecb6dfcd5b3cc62f # 0.30.5
- uses: hoverkraft-tech/ci-github-container/actions/docker/prune-pull-requests-image-tags@a0bab9151cc074af9f6c8204ab42a48d2d570379 # 0.30.6
with:
# Image name
image: ""
Expand All @@ -53,6 +53,11 @@ permissions:
# Default: `^pr-([0-9]+)(?:-|$)`
pull-request-tag-filter: ^pr-([0-9]+)(?:-|$)

# Optional regular expression to match tags that should be preserved (not deleted).
# Tags matching this pattern will never be deleted, even if they are on a package version with PR tags.
# Example: "^v.*" to preserve version tags like v1.0.0, v2.1.3, etc.
preserve-tags-filter: ""

# GitHub token with the folowing scopes: `pull-requests:read`, `packages:read` and `packages:delete`.
# See https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries.
#
Expand All @@ -70,6 +75,9 @@ permissions:
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ---------------------- |
| **`image`** | Image name | **false** | - |
| **`pull-request-tag-filter`** | The regular expression to match pull request tags. Must have a capture group for the pull request number. | **false** | `^pr-([0-9]+)(?:-\|$)` |
| **`preserve-tags-filter`** | Optional regular expression to match tags that should be preserved (not deleted). | **false** | - |
| | Tags matching this pattern will never be deleted, even if they are on a package version with PR tags. | | |
| | Example: "^v.*" to preserve version tags like v1.0.0, v2.1.3, etc. | | |
| **`github-token`** | GitHub token with the folowing scopes: `pull-requests:read`, `packages:read` and `packages:delete`. | **false** | `${{ github.token }}` |
| | See <https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries>. | | |

Expand Down Expand Up @@ -122,7 +130,7 @@ This project is licensed under the MIT License.

SPDX-License-Identifier: MIT

Copyright © 2025 hoverkraft
Copyright © 2026 hoverkraft

For more details, see the [license](http://choosealicense.com/licenses/mit/).

Expand Down