File tree Expand file tree Collapse file tree 2 files changed +46
-17
lines changed
Expand file tree Collapse file tree 2 files changed +46
-17
lines changed Original file line number Diff line number Diff line change 11name : Playwright Tests
22
33on :
4- # push:
5- # branches: [main, next]
64 pull_request :
75
86jobs :
@@ -29,20 +27,13 @@ jobs:
2927 name : playwright-report
3028 path : ./playwright-report
3129 retention-days : 1
32- - name : Upload Playwright report
33- if : always()
34- env :
35- AWS_ACCESS_KEY_ID : ${{ secrets.STORYBOOK_S3_KEY_ID }}
36- AWS_SECRET_ACCESS_KEY : ${{ secrets.STORYBOOK_S3_SECRET_KEY }}
37- AWS_DEFAULT_REGION : ru-central1
38- AWS_EC2_METADATA_DISABLED : true
39- run : aws s3 cp ./playwright-report s3://playwright-reports/dynamic-forms/pulls/${{ github.event.pull_request.number }}/ --endpoint-url=https://storage.yandexcloud.net --recursive
30+ - name : Save PR ID
31+ run : |
32+ pr="${{ github.event.pull_request.number }}"
33+ echo $pr > ./pr-id.txt
4034 shell : bash
41- - name : Create Comment
42- if : always()
43- uses : marocchino/sticky-pull-request-comment@v2
35+ - name : Create PR Artifact
36+ uses : actions/upload-artifact@v3
4437 with :
45- GITHUB_TOKEN : ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }}
46- number : ${{ github.event.pull_request.number }}
47- header : playwright test
48- message : ' [Playwright Test Component](https://storage.yandexcloud.net/playwright-reports/dynamic-forms/pulls/${{ github.event.pull_request.number }}/index.html) is ready.'
38+ name : pr
39+ path : ./pr-id.txt
Original file line number Diff line number Diff line change 1+ name : PR Playwright Report
2+
3+ on :
4+ workflow_run :
5+ workflows : ['Playwright Tests']
6+ types :
7+ - completed
8+
9+ jobs :
10+ comment :
11+ name : Upload Playwright report to s3
12+ if : github.event.workflow_run.event == 'pull_request'
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Download Artifacts
16+ uses : dawidd6/action-download-artifact@v2
17+ with :
18+ workflow : ${{ github.event.workflow_run.workflow_id }}
19+ run_id : ${{ github.event.workflow_run.id }}
20+ - name : Extract PR Number
21+ id : pr
22+ run : echo "::set-output name=id::$(<pr/pr-id.txt)"
23+ shell : bash
24+ - name : Upload
25+ env :
26+ AWS_ACCESS_KEY_ID : ${{ secrets.STORYBOOK_S3_KEY_ID }}
27+ AWS_SECRET_ACCESS_KEY : ${{ secrets.STORYBOOK_S3_SECRET_KEY }}
28+ AWS_DEFAULT_REGION : ru-central1
29+ AWS_EC2_METADATA_DISABLED : true
30+ run : aws s3 cp playwright-report s3://playwright-reports/dynamic-forms/pulls/${{ steps.pr.outputs.id }}/ --endpoint-url=https://storage.yandexcloud.net --recursive
31+ shell : bash
32+ - name : Create Comment
33+ uses : marocchino/sticky-pull-request-comment@v2
34+ with :
35+ GITHUB_TOKEN : ${{ secrets.GRAVITY_UI_BOT_GITHUB_TOKEN }}
36+ number : ${{ steps.pr.outputs.id }}
37+ header : playwright test
38+ message : ' [Playwright Test Component](https://storage.yandexcloud.net/playwright-reports/dynamic-forms/pulls/${{ steps.pr.outputs.id }}/index.html) is ready.'
You can’t perform that action at this time.
0 commit comments