generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Trying to use ignore-versions
with the new support for ghcr container package types, but it doesn't seem to work. I am trying to delete beta packages when pushing into the develop branch, and non beta packages when pushing into main. But ATM it just deletes the packages regardless of the name.
My full example config is here:
name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: npm install
run: npm install
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
run: node ./node_modules/gulp/bin/gulp.js ci-docker-build
env:
DEBUG: true
- name: Docker publish
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
run: node ./node_modules/gulp/bin/gulp.js ci-docker-publish
env:
DEBUG: true
- name: Docker cleanup develop images
if: github.ref == 'refs/heads/develop'
uses: actions/delete-package-versions@v4
with:
package-name: 'dave-test'
package-type: 'container'
min-versions-to-keep: 2
ignore-versions: '^((?!beta).)*$'
- name: Docker cleanup production images
if: github.ref == 'refs/heads/main'
uses: actions/delete-package-versions@v4
with:
package-name: 'dave-test'
package-type: 'container'
min-versions-to-keep: 3
ignore-versions: 'beta'
mohakhlf, Rycieos, rob-whittle, wjkw1, UnderKoen and 9 more
Metadata
Metadata
Assignees
Labels
No labels