Skip to content

Commit

Permalink
Merge pull request #2 from kopax-polyconseil/fix-state
Browse files Browse the repository at this point in the history
fix(compressionMethod): fix compression method being wrongly detected
  • Loading branch information
kopax-polyconseil authored Nov 30, 2023
2 parents 2197b89 + 1fd3fa9 commit a3b30e2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/main/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/post/index.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ async function main() {
saveState({
bucket: inputs.bucket,
path: inputs.path,
compressionMethod: inputs.compressionMethod,
keyFileName: inputs.keyFileName,
cacheHitKind: 'none',
targetFileName: exactFileName,
keyFileName: inputs.keyFileName,
});
core.setOutput('cache-hit', 'false');
console.log('😢 No cache candidate found.');
Expand Down Expand Up @@ -127,6 +128,8 @@ async function main() {
saveState({
bucket: inputs.bucket,
path: inputs.path,
compressionMethod: inputs.compressionMethod,
keyFileName: inputs.keyFileName,
cacheHitKind: 'none',
targetFileName: exactFileName,
});
Expand Down Expand Up @@ -164,6 +167,8 @@ async function main() {
saveState({
path: inputs.path,
bucket: inputs.bucket,
compressionMethod: inputs.compressionMethod,
keyFileName: inputs.keyFileName,
cacheHitKind: bestMatchKind,
targetFileName: exactFileName,
});
Expand Down
2 changes: 1 addition & 1 deletion src/tar-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function getTarCompressionMethod(): Promise<CompressionMethod> {
}
const state = getState();

if (state.compressionMethod) {
if (state.compressionMethod === CompressionMethod.GZIP) {
return CompressionMethod.GZIP;
}

Expand Down

0 comments on commit a3b30e2

Please sign in to comment.