lyne-components
lyne-components copied to clipboard
Stabilize visual regression check when facing a job re-run
Currently, there is no visible visual regression status check whenever there were more than on run attempts. With that, important changes could be invisible at the checks. We need to change secure workflow like following:
visual-regression:
runs-on: ubuntu-latest
if: >
(github.event.workflow_run.event == 'pull_request' || (github.event.workflow_run.event == 'push' && github.event.workflow_run.run_attempt > 1)) &&
github.event.workflow_run.conclusion == 'success'
...
- name: get workflow id
uses: actions/github-script@v7
with:
script: |
# If pull request => context.event.workflow_run.id
# If push => find check suite with head sha and get newest PR (we need PR Number and workflow id)
# Following steps will need those vars
...