fix filepath when using path input

This commit is contained in:
Peter Evans 2024-07-27 21:02:41 +00:00
parent 396429353a
commit 184d576617
3 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,4 @@
import * as core from '@actions/core'
import * as fs from 'fs'
import {graphql} from '@octokit/graphql'
import type {
Repository,
@ -327,7 +326,7 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
core.debug(`Reading contents of file: '${file}'`)
fileChanges.additions!.push({
path: file,
contents: fs.readFileSync(file).toString('base64')
contents: utils.readFileBase64([repoPath, file])
})
}