read to buffer not string and use non-legacy method to base64
This commit is contained in:
parent
6c03c11aff
commit
3563849c8a
2 changed files with 2 additions and 2 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
|
@ -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) {
|
||||
|
|
|
@ -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')
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue