chromaui / chromatic-cli

Chromatic CLI: `npx chromatic`
https://www.chromatic.com/docs/cli
MIT License
289 stars 70 forks source link

chromaui/action skipping rebuild omit output prop `storybookUrl` #983

Open matthprost opened 5 months ago

matthprost commented 5 months ago

Bug report

Hello!

I recently faced an issue with chromaui/action@v11. When no rebuild is needed I have the following output:

Skipping rebuild of an already fully passed/accepted build

For now, no problem for me this seems fair. The issue with this is that when the build is skipped like so, the github action does not provide storybookUrl as output as it usually does. This leads to issues for us as we need it to display a deployment button on our pull requests with the storybookUrl.

The workaround I found is to pass forceRebuild: true as input as seen on this PR, but it might not be the best way to do it. I think there is an issue with the github action not providing the correct output especially storybookUrl.

The issue can be found on our github actions here: https://github.com/scaleway/ultraviolet/actions/runs/9077521594/job/24956851613?pr=3773

Screenshot 2024-05-14 at 17 56 00

You can find our config here: https://github.com/scaleway/ultraviolet/blob/d23bfe6332ddff37dbb6f6b28ae6c694a5e838d3/.github/workflows/ci.yml#L160

Where we will get steps.chromatic.outputs.storybookUrl that is undefined when no rebuild is needed but correctly set when the build is needed.

If you need anymore details don't hesitate!

cgbl-90 commented 2 months ago

hey @matthprost I believed this behaviour is set by default for no rebuilds, but let me discuss it internally.

have you tried this workaround: https://www.chromatic.com/docs/faq/get-published-storybook-url-via-ci/?