|
6 | 6 | chromatic-deployment: |
7 | 7 | name: Chromatic |
8 | 8 | runs-on: ubuntu-latest |
9 | | - permissions: |
10 | | - contents: read |
11 | | - pull-requests: read |
| 9 | + outputs: |
| 10 | + statis: ${{ job.status }} |
| 11 | + # permissions: |
| 12 | + # contents: read |
| 13 | + # pull-requests: read |
12 | 14 | steps: |
13 | 15 | - name: Checkout |
14 | | - uses: actions/checkout@v1 |
| 16 | + uses: actions/checkout@v4 |
| 17 | + with: |
| 18 | + fetch-depth: 0 |
15 | 19 |
|
16 | 20 | - name: Install dependencies |
17 | 21 | run: yarn |
18 | 22 |
|
19 | 23 | - name: Publish to Chromatic |
20 | 24 | id: chromatic |
21 | | - uses: chromaui/action@v1 |
| 25 | + uses: chromaui/action@latest |
22 | 26 | with: |
23 | 27 | exitZeroOnChanges: true |
24 | 28 | autoAcceptChanges: true |
25 | 29 | projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |
| 30 | + token: ${{ secrets.TOKEN }} |
26 | 31 |
|
27 | | - - name: Get PR data |
28 | | - uses: actions/github-script@v7 |
29 | | - id: get_pr_data |
30 | | - with: |
31 | | - script: | |
32 | | - return ( |
33 | | - await github.rest.repos.listPullRequestsAssociatedWithCommit({ |
34 | | - commit_sha: context.sha, |
35 | | - owner: context.repo.owner, |
36 | | - repo: context.repo.repo, |
37 | | - }) |
38 | | - ).data[0]; |
39 | | -
|
40 | | - - name: Pull Request data |
41 | | - run: | |
42 | | - echo '${{ fromJson(steps.get_pr_data.outputs.result).number }}' |
43 | | - echo '${{ fromJson(steps.get_pr_data.outputs.result).title }}' |
| 32 | + - name: Publish Summary |
| 33 | + run: echo -e "Result ${{ steps.chromatic.outputs.buildUrl }} Storybook Preview ${{ steps.chromatic.outputs.storybookUrl }}" |
| 34 | + |
| 35 | + # - name: Get PR data |
| 36 | + # uses: actions/github-script@v7 |
| 37 | + # id: get_pr_data |
| 38 | + # with: |
| 39 | + # script: | |
| 40 | + # return ( |
| 41 | + # await github.rest.repos.listPullRequestsAssociatedWithCommit({ |
| 42 | + # commit_sha: context.sha, |
| 43 | + # owner: context.repo.owner, |
| 44 | + # repo: context.repo.repo, |
| 45 | + # }) |
| 46 | + # ).data[0]; |
| 47 | + |
| 48 | + # - name: Pull Request data |
| 49 | + # run: | |
| 50 | + # echo '${{ fromJson(steps.get_pr_data.outputs.result).number }}' |
| 51 | + # echo '${{ fromJson(steps.get_pr_data.outputs.result).title }}' |
44 | 52 |
|
45 | 53 | # - name: Comment PR |
46 | 54 | # uses: thollander/actions-comment-pull-request@v3 |
47 | 55 | # with: |
48 | 56 | # message: | |
49 | 57 | # Hello world ! :wave: |
50 | 58 |
|
51 | | - - name: comment PR |
52 | | - uses: thollander/actions-comment-pull-request@v1 |
53 | | - env: |
54 | | - GITHUB_TOKEN: ${{ secrets.TOKEN }} |
55 | | - with: |
56 | | - message: "🚀storybook: ${{ steps.chromatic.outputs.storybookUrl }}" |
| 59 | + # - name: comment PR |
| 60 | + # uses: thollander/actions-comment-pull-request@v1 |
| 61 | + # env: |
| 62 | + # GITHUB_TOKEN: ${{ secrets.TOKEN }} |
| 63 | + # with: |
| 64 | + # message: "🚀storybook: ${{ steps.chromatic.outputs.storybookUrl }}" |
57 | 65 |
|
58 | 66 | # - name: Save PR number and Chromatic build outputs |
59 | 67 | # run: | |
|
0 commit comments