Skip to content

try reg expression

try reg expression #3

name: 'Remove Pull Request Packages'
on:
pull_request:
types: [closed]
permissions:
packages: write
env:
REGISTRY: ghcr.io
jobs:
retention_policy:
if: github.event.pull_request.merged == true
name: Retention policy
runs-on: ubuntu-latest
steps:
- uses: actions/delete-package-versions@v4
with:
owner: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
package-type: container
package-name: playnite-web
ignore-versions: '^[a-z0-9]+-(?!PR${{ github.event.pull_request.number }}$'
# ignore-versions: '^([a-z0-9]+-v[0-9]+\.[0-9]+\.[0-9]+)|([a-z0-9]+-PR(?!${{ github.event.pull_request.number }})|([a-z0-9]+-dev))$]'