read to buffer not string and use non-legacy method to base64

This commit is contained in:
Peter Evans committed 2024-07-31 17:54:04 +01:00
1 parent 7c0b09154e
commit 3e7e19f0eb
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -525,7 +525,7 @@ function createPullRequest(inputs) {
core.debug(`Reading contents of file: '${file}'`);
fileChanges.additions.push({
path: file,
contents: btoa(fs.readFileSync(file, 'utf8'))
contents: fs.readFileSync(file).toString('base64')
});
}
for (const file of deletedFiles) {
+1 -1
View File
@@ -327,7 +327,7 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
core.debug(`Reading contents of file: '${file}'`)
fileChanges.additions!.push({
path: file,
contents: btoa(fs.readFileSync(file, 'utf8'))
contents: fs.readFileSync(file).toString('base64')
})
}