Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Package Lifecycle Action

CI GitHub Marketplace

Deletes package versions based on a lifecycle policy. Highly recommended to be used with dry-run first to validate the policy before actually deleting any package versions.

Usage

Example

jobs:
  package-lifecycle:
    permissions:
      packages: write

    steps:
      - name: Package Lifecycle
        id: package-lifecycle
        uses: ovsds/package-lifecycle-action@v1
        with:
          package-name: package-lifecycle-action/test-image
          package-type: container
          tag-regex: "^test-tag$"
          untagged: true
          expire-period-days: 10
          retained-tagged-top: 0
          retain-untagged: true
          dry-run: true

Action Inputs

Name Description Default
package-name The name of the package.
package-type Type of the package. Supported values: container. container
owner The owner of the repository. ${{ github.repository_owner }}
tag-regex Regex to match version tags to be considered for deletion. .*
untagged Whether to apply to untagged versions. false
expire-period-days The amount of days that must elapse after the creation of a package version in order for it to be eligible for automatic deletion. 30
retained-tagged-top The number of tagged package versions (matching the specified tag filter) that must be kept, even if the expire-period has already expired. 1
retain-untagged Whether to retain untagged versions not older then the oldest retained tagged version. true
dry-run Whether to perform a dry run, without actually deleting any package versions. false
github-token GitHub token to authenticate with the GitHub API, scope: 'packages: write'. ${{ github.token }}

Development

Global dependencies

  • mise, activated in the shell (eval "$(mise activate zsh)")

All other tools are pinned in mise.toml.

mise tasks

For all commands see mise.toml or mise tasks ls.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages