Skip to content

[BUG] sync-main-to-dev PRs do not trigger CI in downstream repos #405

@c-vigo

Description

@c-vigo

Description

PRs created by assets/workspace/.github/workflows/sync-main-to-dev.yml in downstream repos (e.g. devcontainer-smoke-test) do not trigger CI workflows. Because branch protection on dev requires CI to pass, these PRs can never be merged—even when auto-merge is enabled.

The root cause is a GitHub Actions limitation: events (push, pull_request) triggered by a GitHub App installation token do not start new workflow runs, to prevent recursive loops. The sync-main-to-dev workflow uses:

  • commit-app-token (GitHub App) to push the sync branch—no push event fires
  • release-app-token (GitHub App) to create the PR—no pull_request event fires

Latest deployment: vig-os/devcontainer-smoke-test#51
Blocked sync PR: vig-os/devcontainer-smoke-test#52

The upstream workflow (.github/workflows/sync-main-to-dev.yml) in this repo has the same pattern and may be affected too.

Steps to Reproduce

  1. Merge a PR to main in a downstream repo (e.g. devcontainer-smoke-test)
  2. sync-main-to-dev fires, creates a sync branch and opens a PR targeting dev
  3. Observe: no CI workflows run on the PR
  4. PR remains unmergeable due to required status checks

Expected Behavior

CI workflows should run on the sync PR so it can pass required status checks and be merged (or auto-merged).

Actual Behavior

No CI workflows are triggered. The PR is stuck with pending/missing status checks and cannot be merged.

Environment

  • GitHub Actions runner: ubuntu-22.04
  • Workflow: assets/workspace/.github/workflows/sync-main-to-dev.yml
  • Downstream repo: vig-os/devcontainer-smoke-test

Additional Context

This is a known GitHub limitation: when workflows use certain tokens to perform tasks, events from those actions may not create new workflow runs (same class of behavior as GITHUB_TOKEN not re-triggering workflows).

Possible Solution

Options to consider:

  1. After creating the PR, explicitly trigger CI via workflow_dispatch or repository_dispatch
  2. Use a PAT for the branch push or PR creation step (trades security for simplicity)
  3. Close and reopen the PR with GITHUB_TOKEN to generate a new pull_request event from a different actor

Changelog Category

Fixed

Metadata

Metadata

Assignees

Labels

area:ciCI/CD, GitHub Actions, workflowsbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions