Skip to content

Commit

Permalink
cache: run cache.post in core.group
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Mar 15, 2024
1 parent cd14c5b commit e73765a
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 e73765a

Please sign in to comment.