Action to prune existing package versions related to closed pull requests
Set permissions to read contents and pull-requests. This is required to get the PR branch.
on: issue_comment
permissions:
contents: read
pull-requests: read
- uses: hoverkraft-tech/ci-github-container@0.20.2
with:
# Description: Image name
#
image: ""
# Description: The regular expression to match pull request tags. Must have a
# capture group for the pull request number.
#
# Default: ^pr-([0-9]+)(?:-|$)
pull-request-tag-filter: ""
# Description: GitHub token with the packages:read and packages:delete scopes. See
# <https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries>.
#
# Default: $
github-token: ""
Input | Description | Default | Required |
---|---|---|---|
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. | ^pr-([0-9]+)(?:-\|$) |
false |
github-token |
GitHub token with the packages:read and packages:delete scopes. See https://docs.github.com/en/packages/learn-github-packages/about-permissions-for-github-packages#about-scopes-and-permissions-for-package-registries. |
$ |
false |
Output | Description |
---|---|
deleted-image-tags |
The list of deleted tags for given image. Example: [“1.0.0”, “1.0.1”] |
npx standard --fix actions/docker/prune-pull-requests-image-tags/index.js