From 4c96f1c5d02d92eef6c5f8ae84917704514d3e40 Mon Sep 17 00:00:00 2001 From: Linh Chu Date: Thu, 4 Jun 2026 15:28:31 -0400 Subject: [PATCH] [CNSL-2288] Add automated fork main sync with upstream Adds sync-fork.yml: on every push to upstream main (and via manual workflow_dispatch), calls the cockroachdb/actions sync-fork reusable workflow to push upstream's main to crl-gh-actions-pr-bot's fork's main. The reusable workflow no-ops unless github.repository matches the configured upstream_repo, so the file is safe to land on both upstream and any fork. --- .github/workflows/sync-fork.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/sync-fork.yml diff --git a/.github/workflows/sync-fork.yml b/.github/workflows/sync-fork.yml new file mode 100644 index 00000000000..4796fb4a98d --- /dev/null +++ b/.github/workflows/sync-fork.yml @@ -0,0 +1,23 @@ +name: Sync Fork + +# Pushes cockroachdb/docs's main to the fork's main on every +# commit to main. The reusable workflow no-ops when invoked anywhere other +# than the configured upstream_repo. + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read # Reusable workflow uses GITHUB_TOKEN to fetch this repo's main + +jobs: + sync: + uses: cockroachdb/actions/.github/workflows/sync-fork.yml@v0 + with: + upstream_repo: cockroachdb/docs + fork_repo: crl-gh-actions-pr-bot/docs + allow_fork_force_sync: false + secrets: + fork_push_token: ${{ secrets.FORK_PUSH_TOKEN }} \ No newline at end of file