Add primaryKey check

This commit is contained in:
Sergey Dolin 2023-03-06 16:51:42 +01:00
parent fedff717b9
commit 2df757ebf1
2 changed files with 11 additions and 0 deletions

View file

@ -59,6 +59,13 @@ const cachePackages = async () => {
);
}
if (!primaryKey) {
core.info(
'Primary key was not generated. Please check the log messages above for more errors or information'
);
return;
}
if (primaryKey === state) {
core.info(
`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`