Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

GHCR Delete Image

Actions
Delete images from ghcr.io with different strategies.
v1.0.1
Star (43)

ghcr-delete-image

CI wakatime

Delete image from Github Container Registry by tag. Useful for cleanup of pull request scoped images.

Usage

Example of workflow, that delete image when PR was closed.

name: '[RM] Preview'

on:
  pull_request:
    types: [closed]

jobs:
  purge-image:
    name: Delete image from ghcr.io
    runs-on: ubuntu-latest
    steps:
      - name: Delete image
        uses: bots-house/[email protected]
        with:
          # NOTE: at now only orgs is supported
          owner: bots-house
          name: some-web-service
          # NOTE: using Personal Access Token
          token: ${{ secrets.PAT }}
          tag: pr-${{github.event.pull_request.number}}

GHCR Delete Image is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Delete images from ghcr.io with different strategies.
v1.0.1

GHCR Delete Image is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.