Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: implement ghcr.io expiration for images and cache layers #601

Merged

Conversation

jiridanek
Copy link
Member

@jiridanek jiridanek commented Jun 28, 2024

Description

Fixes #568

How Has This Been Tested?

See the action in action at https://github.com/jiridanek/notebooks/actions/runs/9717613825/job/26823642202#step:3:18

The repos this is cleaning are https://github.com/jiridanek/notebooks/pkgs/container/notebooks%2Fworkbench-images and https://github.com/jiridanek/notebooks/pkgs/container/notebooks%2Fworkbench-images%2Fbuild-cache

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

.github/workflows/purge-ghcr.yaml Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot added the lgtm label Jul 2, 2024
@atheo89
Copy link
Member

atheo89 commented Jul 3, 2024

Are we sure that sufficient time has been allocated to inspect the Trivy report before this workflow proceed to prune the images?

@caponetto
Copy link
Contributor

Are we sure that sufficient time has been allocated to inspect the Trivy report before this workflow proceed to prune the images?

I don't see it as an issue since the workflow prunes images that are 3 weeks old. We can always resort to the latest report/image if necessary.

@jiridanek
Copy link
Member Author

jiridanek commented Jul 3, 2024

we could push :latest tags to ghcr and set the workflow to leave the newest image around, if we wanted to spend more time on this; before I did not want to have latest at all because hashes give so much more certainty all around

@atheo89
Copy link
Member

atheo89 commented Jul 3, 2024

the workflow prunes images that are 3 weeks old

Ahhh ok i got it!

we could push :latest tags to ghcr and set the workflow to leave the newest image around, if we wanted to spend more time on this; before I did not want to have latest at all because hashes give so much more certainty all around

That's fine Jiri!

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Jul 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: atheo89, caponetto, jstourac

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jul 3, 2024
@jiridanek
Copy link
Member Author

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit 64fb240 into opendatahub-io:main Jul 3, 2024
6 checks passed
@jiridanek jiridanek deleted the jd_delete_old_images branch July 3, 2024 17:02
jiridanek added a commit to jiridanek/notebooks that referenced this pull request Jul 12, 2024
…ahub-io#601)

* ci: implement ghcr.io expiration for images and cache layers

* fixups from rewiew, reference action by hash not tag

Co-authored-by: Guilherme Caponetto <[email protected]>

---------

Co-authored-by: Guilherme Caponetto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ghcr.io expiration for images and cache layers
4 participants