From b82a318e4c1eac7ef38ed1b241677a81db08494b Mon Sep 17 00:00:00 2001 From: Aaron Imming Date: Thu, 4 May 2023 16:25:56 +0800 Subject: [PATCH] chore: use marocchino action for test comment --- .github/workflows/example.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 471e69e..9c45b9f 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -8,6 +8,8 @@ jobs: capture_vercel_preview_url: name: Capture Vercel preview URL runs-on: "ubuntu-latest" + permissions: + pull-requests: write steps: - uses: aaimio/vercel-preview-url-action@main id: vercel_preview_url @@ -15,13 +17,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Below is merely an example of what you could do with the preview URL. # The preview URL is accessed through ${{ steps..outputs.vercel_preview_url }} - - uses: actions/github-script@v6 + - uses: marocchino/sticky-pull-request-comment@v2 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'The preview URL is: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}.' - }); + message: | + The preview URL is: ${{ steps.vercel_preview_url.outputs.vercel_preview_url }}.