Skip to content

Bot commits from update-snapshots workflow do not trigger CI #358

Description

@mmcky

Problem

When /update-new-snapshots is triggered on a PR, the update-snapshots.yml workflow commits new visual baselines via the github-actions[bot] user using GITHUB_TOKEN. These bot commits do not trigger CI workflows due to two factors:

  1. The commit message contains [skip ci] — explicitly skipping CI.
  2. GitHub's infinite loop prevention: commits made with GITHUB_TOKEN do not trigger push or pull_request events, regardless of the commit message.

This means after new snapshots are committed, there's no automated CI run to validate the visual tests pass with the new baselines. You must manually close/reopen the PR to trigger CI.

Current Workaround

Close and reopen the PR after /update-new-snapshots commits the snapshots. This triggers pull_request events and runs CI.

Potential Solutions

  1. Use a PAT or GitHub App token instead of GITHUB_TOKEN in the update-snapshots workflow. Commits made with a PAT will trigger workflows. Requires adding a secret to the repo.
  2. Add a verification step to the update-snapshots workflow that runs the Playwright tests again after committing, to validate within the same workflow run.
  3. Add a workflow_dispatch trigger to ci.yml and have the update-snapshots workflow trigger it via the GitHub API after committing.
  4. Remove [skip ci] from the commit message — this alone won't fix it (GITHUB_TOKEN limitation), but would be needed alongside any of the above solutions.

Affected Workflows

  • .github/workflows/update-snapshots.yml — commits with [skip ci] and GITHUB_TOKEN
  • .github/workflows/ci.yml — triggers on push to main and pull_request

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions