diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 601b7ce..ac68de1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,6 @@ name: tests on: push: - branches: [ main ] pull_request: branches: [ main ] concurrency: testing diff --git a/clean_ghcr.py b/clean_ghcr.py index e67f2e0..6c1863d 100644 --- a/clean_ghcr.py +++ b/clean_ghcr.py @@ -59,7 +59,9 @@ def get_list_packages(owner, repo_name, owner_type, package_name): f"/{owner_type}s/{owner}/packages/container/{package_name}") response = requests.get(url, headers=get_base_headers()) if not response.ok: - if response.status_code != 404: + if response.status_code == 404: + return [] + else: raise Exception(response.text) return [response.json()]