Skip to content

Commit

Permalink
Merge pull request #281 from crazy-max/cache-post-group
Browse files Browse the repository at this point in the history
cache: run cache.post in core.group
  • Loading branch information
tonistiigi committed Mar 15, 2024
2 parents cd14c5b + e73765a commit a24f5c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class Cache {
public static async post(): Promise<CachePostState | undefined> {
const state = core.getState(Cache.POST_CACHE_KEY);
if (!state) {
core.debug(`Cache.post no state`);
core.info(`State not set`);
return Promise.resolve(undefined);
}
let cacheState: CachePostState;
Expand Down
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export async function run(main: () => Promise<void>, post?: () => Promise<void>)
if (post) {
await post();
}
await Cache.post();
await core.group(`Post cache`, async () => {
await Cache.post();
});
}
}

0 comments on commit a24f5c1

Please sign in to comment.