Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Latest commit

 

History

History
37 lines (28 loc) · 1.16 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.16 KB

migrated: https://gitlab.com/l1905/maven-business/maven-webchat/ghcr-delete-image-action

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}}