Skip to content

Commit

Permalink
working
Browse files Browse the repository at this point in the history
  • Loading branch information
reggi committed Apr 26, 2024
1 parent e4a3b65 commit 5291ecf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
./script/commentbody ${{ github.event.issue.number }}
- name: Set output
run: ${{ steps.issueForm.outputs.name }}
run: echo "${{ steps.issueForm.outputs.name }}"

# create-pr:
# runs-on: ubuntu-latest
Expand Down
15 changes: 8 additions & 7 deletions script/commentbody
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ const data = Object.fromEntries(
.filter(v => v),
)

// process.stdout.write(JSON.stringify(object))

const outputString = Object.entries(data)
.map(([key, value]) => `${key}=${value}`)
.join('\n')

await fs.writeFile(process.env.GITHUB_OUTPUT, outputString)
if (process.env.CI && process.env.GITHUB_OUTPUT) {
const outputString = Object.entries(data)
.map(([key, value]) => `${key}=${value}`)
.join('\n')
await fs.writeFile(process.env.GITHUB_OUTPUT, outputString)
} else {
process.stdout.write(JSON.stringify(object))
}

0 comments on commit 5291ecf

Please sign in to comment.