-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: split save
and restore
cache actions
#7614
ci: split save
and restore
cache actions
#7614
Conversation
run: mage test:fixtureContainerImages | ||
|
||
- name: Generate image list digest | ||
if: github.ref == 'refs/heads/main' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
if: github.ref == 'refs/heads/main' | |
if: github.ref_name == 'main' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use go-version
for security patches in the release workflow, but I think we can use go-version-file
for this workflow.
go-version: ${{ env.GO_VERSION }} | |
go-version-file: go.mod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also thought about this.
Updated in 91a8016
with: | ||
aqua_version: v1.25.0 | ||
|
||
- name: Download test images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should restore cache before this step. Otherwise, it downloads images every time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 91a8016
We use restore
and save
actions, so we can use actions/cache
in this workflow.
@@ -0,0 +1,80 @@ | |||
name: Cache test images | |||
on: | |||
workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to add schedule
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do this job once a day?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, let's start with daily. Most images are unchanged, and we don't call GHCR API other than listing tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 91a8016
Description
Split
save
andrestore
cache actions:actions/cache/restore
intests
.actions/cache
in newcache-test-images.yaml
workflow.test runs:
Checklist