Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ inputs:
description: 'The GitHub access token'
required: false
default: ${{ github.token }}
max-image-width:
description: 'Maximum width for uploaded images (in pixels). If not provided, images will not be resized. Recommended: 1500.'
required: false
max-image-height:
description: 'Maximum height for uploaded images (in pixels). If not provided, images will not be resized. Recommended: 1500.'
required: false
runs:
using: 'node20'
main: 'action/dist/main.js'
Expand Down
6,883 changes: 117 additions & 6,766 deletions action/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion action/dist/main.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"@actions/github": "9.0.0",
"@aws-sdk/client-s3": "3.975.0",
"bluebird": "3.7.2",
"glob": "13.0.0",
"sharp": "0.34.5"
"glob": "13.0.0"
},
"devDependencies": {
"@types/bluebird": "3.5.42",
Expand Down
94 changes: 0 additions & 94 deletions action/src/image-utils.ts

This file was deleted.

5 changes: 0 additions & 5 deletions action/src/s3-operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import * as fs from 'fs';
import { promises as fsPromises } from 'fs';
import { glob } from 'glob';
import { Readable } from 'stream';
import { resizeImages } from './image-utils';

const s3Client = new S3Client();

Expand Down Expand Up @@ -96,9 +95,6 @@ async function uploadLocalDirectory(
`Uploading ${files.length} file(s) from ${localDir} to s3://${bucketName}/${s3Prefix}`
);

const filePaths = files.map(file => path.join(localDir, file));
await resizeImages(filePaths);

await map(files, async file => {
const localFilePath = path.join(localDir, file);
const s3Key = path.join(s3Prefix, file);
Expand Down Expand Up @@ -196,7 +192,6 @@ export const uploadAllImages = async (hash: string) => {
export const uploadBaseImages = async (newFilePaths: string[]) => {
const bucketName = getInput('bucket-name', { required: true });
info(`Uploading ${newFilePaths.length} base image(s)`);
await resizeImages(newFilePaths);
return map(newFilePaths, newFilePath =>
uploadSingleFile(newFilePath, bucketName, buildBaseImagePath(newFilePath))
);
Expand Down
201 changes: 0 additions & 201 deletions action/test/image-utils.test.ts

This file was deleted.

44 changes: 8 additions & 36 deletions action/test/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,42 +18,14 @@ const getInputMock = mock();
const getBooleanInputMock = mock();
const getMultilineInputMock = mock();
const setFailedMock = mock();
const infoMock = mock();
const warningMock = mock();

// Create a comprehensive mock for @actions/core to handle ES module exports
mock.module('@actions/core', () => {
return {
info: infoMock,
getInput: getInputMock,
getBooleanInput: getBooleanInputMock,
getMultilineInput: getMultilineInputMock,
setFailed: setFailedMock,
warning: warningMock,
// Add other exports that might be imported
debug: mock(),
error: mock(),
setOutput: mock(),
setSecret: mock(),
addPath: mock(),
exportVariable: mock(),
setCommandEcho: mock(),
saveState: mock(),
getState: mock(),
group: mock(),
startGroup: mock(),
endGroup: mock(),
// ES module default export
default: {
info: infoMock,
getInput: getInputMock,
getBooleanInput: getBooleanInputMock,
getMultilineInput: getMultilineInputMock,
setFailed: setFailedMock,
warning: warningMock
}
};
});
mock.module('@actions/core', () => ({
info: mock(),
getInput: getInputMock,
getBooleanInput: getBooleanInputMock,
getMultilineInput: getMultilineInputMock,
setFailed: setFailedMock,
warning: mock()
}));

const execMock = mock();
mock.module('@actions/exec', () => ({
Expand Down
Loading
Loading