Skip to content

Commit

Permalink
Run when PR is merged (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurensWe authored Jul 31, 2024
2 parents b672736 + edc2943 commit d005786
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ghcr-cleaner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
pull_request:
types:
- closed
push:
branches:
- main

jobs:
delete_old_images:
Expand All @@ -20,7 +23,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: 'Clean up development images'
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && (github.event.action == 'closed' || github.event.pull_request.merged == true)
uses: dataaxiom/ghcr-cleanup-action@v1
with:
tags: 'pr-${{github.event.pull_request.number}}'
Expand Down

0 comments on commit d005786

Please # to comment.