Skip to content

Commit 792266d

Browse files
👩‍💻 dx(CRP): Only run in PRs if workflow file has changed.
1 parent 319864d commit 792266d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/container-retention-policy.yml

+10
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,17 @@ jobs:
2727
packages: write
2828

2929
steps:
30+
- name: Check if workflow file changed 🔍
31+
if: github.event_name == 'pull_request'
32+
id: changes
33+
uses: dorny/paths-filter@v3
34+
with:
35+
filters: |
36+
workflow:
37+
- .github/workflows/container-retention-policy.yml
38+
3039
- name: Cleanup old non-release images 🧹
40+
if: github.event_name != 'pull_request' || steps.changes.outputs.workflow == 'true'
3141
uses: dataaxiom/ghcr-cleanup-action@v1
3242
with:
3343
packages: patient-web,patient-backup,patient-backup-retention-policy

0 commit comments

Comments
 (0)