Skip to content

Commit 08d8639

Browse files
authored
Merge branch 'main' into chore/use-cache-in-check-dist
2 parents e050ebd + a2f324e commit 08d8639

File tree

3 files changed

+26
-27
lines changed

3 files changed

+26
-27
lines changed

dist/restore/index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38489,17 +38489,16 @@ function getInputAsInt(name, options) {
3848938489
}
3849038490
exports.getInputAsInt = getInputAsInt;
3849138491
function isCacheFeatureAvailable() {
38492-
if (!cache.isFeatureAvailable()) {
38493-
if (isGhes()) {
38494-
logWarning(`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
38492+
if (cache.isFeatureAvailable()) {
38493+
return true;
38494+
}
38495+
if (isGhes()) {
38496+
logWarning(`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
3849538497
Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/[email protected]/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`);
38496-
}
38497-
else {
38498-
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
38499-
}
3850038498
return false;
3850138499
}
38502-
return true;
38500+
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
38501+
return false;
3850338502
}
3850438503
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
3850538504

dist/save/index.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38489,17 +38489,16 @@ function getInputAsInt(name, options) {
3848938489
}
3849038490
exports.getInputAsInt = getInputAsInt;
3849138491
function isCacheFeatureAvailable() {
38492-
if (!cache.isFeatureAvailable()) {
38493-
if (isGhes()) {
38494-
logWarning(`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
38492+
if (cache.isFeatureAvailable()) {
38493+
return true;
38494+
}
38495+
if (isGhes()) {
38496+
logWarning(`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
3849538497
Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/[email protected]/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`);
38496-
}
38497-
else {
38498-
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
38499-
}
3850038498
return false;
3850138499
}
38502-
return true;
38500+
logWarning("An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.");
38501+
return false;
3850338502
}
3850438503
exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
3850538504

src/utils/actionUtils.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,20 @@ export function getInputAsInt(
7777
}
7878

7979
export function isCacheFeatureAvailable(): boolean {
80-
if (!cache.isFeatureAvailable()) {
81-
if (isGhes()) {
82-
logWarning(
83-
`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
80+
if (cache.isFeatureAvailable()) {
81+
return true;
82+
}
83+
84+
if (isGhes()) {
85+
logWarning(
86+
`Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
8487
Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/[email protected]/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`
85-
);
86-
} else {
87-
logWarning(
88-
"An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."
89-
);
90-
}
88+
);
9189
return false;
9290
}
9391

94-
return true;
92+
logWarning(
93+
"An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions."
94+
);
95+
return false;
9596
}

0 commit comments

Comments
 (0)