PR Visual Tests Report #745
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Visual Tests Report | |
| on: | |
| workflow_run: | |
| workflows: ['PR Visual Tests'] | |
| types: | |
| - completed | |
| jobs: | |
| comment: | |
| name: Create GitHub Comment | |
| if: github.event.workflow_run.event == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Create token | |
| id: app-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.GRAVITY_UI_APP_ID }} | |
| private-key: ${{ secrets.GRAVITY_UI_APP_PRIVATE_KEY }} | |
| - name: Download Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| github-token: ${{ steps.app-token.outputs.token }} | |
| run-id: ${{ github.event.workflow_run.id }} | |
| - name: Extract PR Number | |
| id: pr | |
| run: echo "::set-output name=id::$(<pr/pr-id.txt)" | |
| shell: bash | |
| - name: Install AWS CLI | |
| uses: unfor19/install-aws-cli-action@v1 | |
| with: | |
| version: 2.22.35 | |
| arch: amd64 | |
| - name: Upload to S3 | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.STORYBOOK_S3_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.STORYBOOK_S3_SECRET_KEY }} | |
| AWS_DEFAULT_REGION: ru-central1 | |
| AWS_EC2_METADATA_DISABLED: true | |
| run: aws s3 cp playwright-report s3://playwright-reports/markdown-editor/pulls/${{ steps.pr.outputs.id}}/ --endpoint-url=https://storage.yandexcloud.net --recursive | |
| shell: bash | |
| - name: Create Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| number: ${{ steps.pr.outputs.id }} | |
| header: visual tests report | |
| message: '[](https://storage.yandexcloud.net/playwright-reports/markdown-editor/pulls/${{ steps.pr.outputs.id }}/index.html)' |