Skip to content

Update pkg.pr.new comment #1

Update pkg.pr.new comment

Update pkg.pr.new comment #1

name: Update pkg.pr.new comment
on:
workflow_run:
workflows: [Publish to pkg.pr.new]
types:
- completed
jobs:
build:
if: github.repository == 'sveltejs/svelte-eslint-parser'
name: Update comment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: output
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- run: ls -R .
- name: Post or update comment
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const output = JSON.parse(fs.readFileSync('output.json', 'utf8'));
const { default: process } = await import('${{ github.workspace }}/tools/pkg.pr.new-comment.mjs')
await process({github, context, core, output})