Skip to content

Commit

Permalink
Merge pull request #2 from chipkent/bug_fix
Browse files Browse the repository at this point in the history
Fixed a bug in the action
  • Loading branch information
chipkent authored Nov 11, 2021
2 parents 091627b + df87d82 commit ed75b18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
This is a GitHub Action to delete GitHub packages. It is very useful to clean up unneeded Docker
images in the GitHub Container Registry (ghcr.io) after a PR is closed.

The example below removes Docker images in ghcr.io with the specified package name and tag. Here, `github-token`
is set to a secret, `CI_ACTION_TOKEN`, which is a personal access token with package deletion permissions.

```
# Delete Docker images after PR merge
#
Expand All @@ -18,7 +21,7 @@ jobs:
name: Delete image from ghcr.io
runs-on: ubuntu-latest
steps:
- uses: chipkent/[email protected].0
- uses: chipkent/[email protected].1
with:
package-name: ${{ github.event.repository.name }}
tag: pr-${{ github.event.pull_request.number }}
Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ runs:
python-version: '3.8'
- name: Install packages
run: pip install requests
shell: bash
- name: Delete image from ghcr.io
run: python ${{ github.action_path }}/docker-cleanup.py ${{ inputs.package-name }} ${{ inputs.tag }} ${{ inputs.github-token }}
shell: bash

0 comments on commit ed75b18

Please sign in to comment.