|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | comment: |
11 | | - name: Create GitHub Comment |
12 | | - if: github.event.workflow_run.event == 'pull_request' |
| 11 | + name: Deploy Report |
| 12 | + if: > |
| 13 | + github.event.workflow_run.event == 'pull_request' && |
| 14 | + github.event.workflow_run.conclusion == 'success' |
13 | 15 | runs-on: ubuntu-latest |
14 | 16 | steps: |
15 | 17 | - name: Generate token |
|
18 | 20 | with: |
19 | 21 | app-id: ${{ secrets.GRAVITY_UI_APP_ID }} |
20 | 22 | private-key: ${{ secrets.GRAVITY_UI_APP_PRIVATE_KEY }} |
21 | | - - name: Download Artifacts |
22 | | - uses: actions/download-artifact@v4 |
| 23 | + - uses: gravity-ui/component-tests-deploy-action@v1 |
23 | 24 | with: |
| 25 | + project: uikit |
24 | 26 | github-token: ${{ steps.generate-token.outputs.token }} |
25 | | - run-id: ${{ github.event.workflow_run.id }} |
26 | | - - name: Extract PR Number |
27 | | - id: pr |
28 | | - run: echo "::set-output name=id::$(<pr/pr-id.txt)" |
29 | | - shell: bash |
30 | | - - name: Install AWS CLI |
31 | | - uses: unfor19/install-aws-cli-action@v1 |
32 | | - with: |
33 | | - version: 2.22.35 |
34 | | - arch: amd64 |
35 | | - - name: Upload to S3 |
36 | | - env: |
37 | | - AWS_ACCESS_KEY_ID: ${{ secrets.STORYBOOK_S3_KEY_ID }} |
38 | | - AWS_SECRET_ACCESS_KEY: ${{ secrets.STORYBOOK_S3_SECRET_KEY }} |
39 | | - AWS_DEFAULT_REGION: ru-central1 |
40 | | - AWS_EC2_METADATA_DISABLED: true |
41 | | - run: aws s3 cp playwright-report s3://playwright-reports/uikit/pulls/${{ steps.pr.outputs.id}}/ --endpoint-url=https://storage.yandexcloud.net --recursive |
42 | | - shell: bash |
43 | | - - name: Create Comment |
44 | | - uses: marocchino/sticky-pull-request-comment@v2 |
45 | | - with: |
46 | | - GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} |
47 | | - number: ${{ steps.pr.outputs.id }} |
48 | | - header: visual tests report |
49 | | - message: '[Visual Tests Report](https://storage.yandexcloud.net/playwright-reports/uikit/pulls/${{ steps.pr.outputs.id }}/index.html) is ready.' |
| 27 | + s3-key-id: ${{ secrets.STORYBOOK_S3_KEY_ID }} |
| 28 | + s3-secret-key: ${{ secrets.STORYBOOK_S3_SECRET_KEY }} |
0 commit comments