Skip to content

Commit 4b895ae

Browse files
committed
fix PR comment
1 parent 60f7890 commit 4b895ae

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

.github/workflows/playwright.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,28 @@ jobs:
3434
WP_PASSWORD: password
3535
STACKABLE_SLUG: Stackable/plugin
3636
run: npm run test
37-
- name: Zip Playwright Report
38-
uses: montudor/action-zip@v1
37+
- uses: actions/upload-artifact@v4
38+
if: ${{ !cancelled() }}
3939
with:
40-
args: zip -qq -r playwright-report-${{ env.VERSION_SUFFIX }}.zip playwright-report
41-
- name: Upload Playwright report artifact
42-
if: ${{ github.event_name == 'pull_request' }}
43-
uses: gavv/[email protected]
40+
name: playwright-report-${{ env.VERSION_SUFFIX }}.zip
41+
path: playwright-report/
42+
retention-days: 30
43+
- name: Find Comment
44+
uses: peter-evans/find-comment@v3
45+
id: fc
4446
with:
45-
commit: ${{ github.event.pull_request.head.sha }}
46-
repo-token: ${{ secrets.GITHUB_TOKEN }}
47-
artifacts: playwright-report-${{ env.VERSION_SUFFIX }}.zip
48-
artifacts-branch: artifacts
47+
issue-number: ${{ github.event.pull_request.number }}
48+
comment-author: 'github-actions[bot]'
49+
body-includes: Playwright Report Artifact
50+
- name: Create or update comment
51+
uses: peter-evans/create-or-update-comment@v4
52+
with:
53+
comment-id: ${{ steps.fc.outputs.comment-id }}
54+
issue-number: ${{ github.event.pull_request.number }}
55+
body: |
56+
` ## Playwright Report Artifact
57+
| file | commit |
58+
| ---- | ------ |
59+
| [playwright-report-${{ env.VERSION_SUFFIX }}.zip](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) | ${{ github.sha }} |
60+
`
61+
edit-mode: replace

0 commit comments

Comments
 (0)