Skip to content

Commit

Permalink
fix(docker): Remove deletion that invalidate image
Browse files Browse the repository at this point in the history
A logic flaw due to a lack of information was also introduced when the cleanup
packages workflow was introduced.

Images on ghcr do not contain the layers info in their API, which leads to being
unable to restrict the deletion of nonchanged layers for a long time.
This is especially valid for base, clucene, and thrift layers.

The unattended removal of old layers makes the main image (sw360) not reachable with
the error of manifest unknown.

Reference issue: #2240

Signed-off-by: Helio Chissini de Castro <[email protected]>
  • Loading branch information
heliocastro committed Dec 19, 2023
1 parent 99c3c94 commit 590a2b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"""

dry_run: bool = True if os.getenv("INPUT_DRY_RUN") == "true" else False
keep = int(os.getenv("INPUT_KEEP"))
keep = int(os.getenv("INPUT_KEEP")) if os.getenv("INPUT_KEEP") else 5
org = os.getenv("GITHUB_REPOSITORY_OWNER")
packages = os.getenv("INPUT_PACKAGES").split("\n")
token = os.getenv("INPUT_TOKEN")
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/clean_up_package_registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
packages: |-
sw360/thrift
sw360/clucene
sw360/base
sw360/binaries
sw360

0 comments on commit 590a2b3

Please sign in to comment.