From 86d7e749e76f406c0e5583e1f4ec394520ad44c3 Mon Sep 17 00:00:00 2001 From: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com> Date: Tue, 1 Dec 2026 11:44:12 -0800 Subject: [PATCH] ci(sync): remove shared upmerge workflow Docs and samples now develop on edge, their default branch, and backport selected fixes to vX.Y with separate pull requests. They no longer run release-to-edge upmerges. Remove the samples upmerge sync group, the shared __upmerge.yml reusable workflow and its caller template, and the related documentation. Update stale notes that said edge is not the default branch for docs and samples. Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com> --- .github/actions/dependabot-failures/README.md | 2 +- .../lockfile-registry-policy/README.md | 2 +- .github/actions/pr-status-labels/README.md | 3 +- .github/sync.yml | 14 +- .github/workflows/__upmerge.yml | 249 ------------------ eng/SYNC.md | 34 +-- workflow-templates/upmerge-samples.yml | 26 -- 7 files changed, 9 insertions(+), 321 deletions(-) delete mode 100644 .github/workflows/__upmerge.yml delete mode 100644 workflow-templates/upmerge-samples.yml diff --git a/.github/actions/dependabot-failures/README.md b/.github/actions/dependabot-failures/README.md index d9f7128..e4a6372 100644 --- a/.github/actions/dependabot-failures/README.md +++ b/.github/actions/dependabot-failures/README.md @@ -58,4 +58,4 @@ To check a real repository, run the **Dependabot Failures** workflow manually wi - Only runs of the Dependabot Updates workflow are checked. Problems that stop Dependabot before a run starts, such as an invalid `.github/dependabot.yml`, show up on the repository's **Insights > Dependency graph > Dependabot** page instead. - Job logs are read for at most 30 failing updates per run. Others show "See run log" as the error type. - Workflow run logs are kept for 90 days at most, and the repository's retention setting can make that shorter. -- Scheduled and manual runs both need the workflow on the repository's default branch. docs and samples sync to `edge`, which is not their default branch, so their check starts once the next release branch is cut from `edge`. +- Scheduled and manual runs both need the workflow on the repository's default branch. docs and samples sync to `edge`, their default branch. diff --git a/.github/actions/lockfile-registry-policy/README.md b/.github/actions/lockfile-registry-policy/README.md index f90e1be..e8d0363 100644 --- a/.github/actions/lockfile-registry-policy/README.md +++ b/.github/actions/lockfile-registry-policy/README.md @@ -85,7 +85,7 @@ Files must be UTF-8 or BOM-marked UTF-16. Matching symlinks, unreadable files, i The existing [Sync workflow](../../workflows/sync.yml) distributes the caller through the lockfile registry policy group in [`.github/sync.yml`](../../sync.yml). That group lists all currently unarchived repositories in `radius-project`, including public, private, and internal repositories. Maintain the list when repositories are added or archived, following the existing sync configuration pattern. Changes to the caller or sync configuration trigger the normal Sync workflow when pushed to `main`; no separate sync workflow or discovery script is used. -Only [`workflow-templates/lockfile-registry-policy.yml`](../../../workflow-templates/lockfile-registry-policy.yml) is distributed, to `.github/workflows/lockfile-registry-policy.yml`. The implementation and tests stay here. The caller is delivered through the existing sync pull requests and `repo-sync` branch prefix; nothing is auto-merged. Following existing organization conventions, `docs` and `samples` target `edge`, and all other repositories target their default branch. These two repositories gain manual dispatch on their default branch after it inherits the caller. +Only [`workflow-templates/lockfile-registry-policy.yml`](../../../workflow-templates/lockfile-registry-policy.yml) is distributed, to `.github/workflows/lockfile-registry-policy.yml`. The implementation and tests stay here. The caller is delivered through the existing sync pull requests and `repo-sync` branch prefix; nothing is auto-merged. Every repository receives the caller on its default branch; following organization conventions, `docs` and `samples` list theirs explicitly as `@edge`. Merge the central implementation into `main` before merging downstream sync PRs, because callers reference `@main`. This repository receives its own caller through the same sync after the central merge, avoiding an unresolved reusable-workflow reference during bootstrap. The existing Test Actions workflow exercises the implementation on feature branches independently. diff --git a/.github/actions/pr-status-labels/README.md b/.github/actions/pr-status-labels/README.md index 4f0e220..2407c30 100644 --- a/.github/actions/pr-status-labels/README.md +++ b/.github/actions/pr-status-labels/README.md @@ -120,7 +120,7 @@ Release-impact labels and review or merge policy are not configured here. The re ## Opting a repository in -The PR status labels group in [`.github/sync.yml`](../../sync.yml) enrolls `radius-project/.github`, `ai-extensions`, `dashboard`, `docs` (synced to `edge`; see [Limitations](#limitations)), `lab`, `radius`, `recipes`, `resource-types-contrib`, and `website`. To enroll another repository: +The PR status labels group in [`.github/sync.yml`](../../sync.yml) enrolls `radius-project/.github`, `ai-extensions`, `dashboard`, `docs` (synced to `edge`, its default branch), `lab`, `radius`, `recipes`, `resource-types-contrib`, and `website`. To enroll another repository: 1. Remove any repository-local lifecycle-label workflows, scripts, and configuration so only one writer updates the labels. 2. Add the repository to the PR status labels group in [`.github/sync.yml`](../../sync.yml), and add any repository-specific labels, including those in an existing `.github/labels.yml` and any existing `pr:` labels, to that group's `repo_labels` (see [Label catalog](#label-catalog)). After the change merges, the Sync workflow opens a pull request in the target repository that adds: @@ -206,7 +206,6 @@ The `Labels` workflow applies `.github/labels.yml` with [crazy-max/ghaction-gith - **Fork hold checks.** Configuration variables are not passed to fork `pull_request` runs; see [Hold check](#hold-check). - **Approval inference.** For ruleset-protected branches without an aggregate review decision, CODEOWNER approval is only inferred from `.github/CODEOWNERS` on the base branch. - **Size limits.** A PR with more than 100 labels or more than 100 pending review requests fails reconciliation rather than being classified from partial data. -- **Non-default sync branch.** `radius-project/docs` is synced to `edge`, but its default branch is a release branch cut from `edge`. `pull_request_target` runs use the base branch's workflow, so PRs into `edge` are labeled as soon as the sync pull request merges. Scheduled reconciliation, `workflow_run` review signals, manual runs, and the `Labels` sync run only from the default branch, so they start once the next release branch is cut from `edge`. Until then, PRs into other branches are not labeled, and lifecycle labels that the reconciler adds lack the shared colors and descriptions. The docs `PR Checks` workflow's required `Check for do-not-merge tag` job is being switched to the shared [hold check](#hold-check) behind a gate job that keeps that context name. - **Platform.** The reusable workflows load their actions with the `$/` self-repository syntax, which requires GitHub.com (not GitHub Enterprise Server) and runner 2.336.0 or newer. actionlint 1.7.12 does not recognize `$/` yet ([rhysd/actionlint#711](https://github.com/rhysd/actionlint/issues/711)). ## Trust model diff --git a/.github/sync.yml b/.github/sync.yml index d8fdbb1..53b8cb4 100644 --- a/.github/sync.yml +++ b/.github/sync.yml @@ -139,14 +139,6 @@ group: - source: sync-templates/.github/instructions/markdown.instructions.md dest: .github/instructions/markdown.instructions.md - # Signed release upmerge - native callers only; shared implementation stays - # here. Keep the destination filename used by the release coordinator. - - repos: | - radius-project/samples@edge - files: - - source: workflow-templates/upmerge-samples.yml - dest: .github/workflows/upmerge.yaml - # Backports from main into existing release/X.Y branches. - repos: | radius-project/radius @@ -162,11 +154,7 @@ group: # Enrolled: .github, ai-extensions, dashboard, docs (edge), lab, radius, # recipes, resource-types-contrib and website. Add repositories here only # after their own lifecycle-label workflows have been removed. - # docs syncs to edge, which is not its default branch. PRs into edge are - # labeled right away, but the schedule, review signals and label sync run - # only from the default branch, so they start once the next release branch - # is cut from edge. docs' required "Check for do-not-merge tag" check is - # moving to the shared hold check (__pr-holds.yml) in docs. + # docs syncs to edge, its default branch. # Docs: .github/actions/pr-status-labels/README.md - repos: | radius-project/.github diff --git a/.github/workflows/__upmerge.yml b/.github/workflows/__upmerge.yml deleted file mode 100644 index a93e01e..0000000 --- a/.github/workflows/__upmerge.yml +++ /dev/null @@ -1,249 +0,0 @@ -# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json -# docs: ../../eng/SYNC.md#signed-release-upmerge ---- -name: __upmerge - -on: - workflow_call: - inputs: - preserve-paths: - description: Newline-delimited literal repository-relative file paths whose edge state, including absence, must be preserved. - type: string - required: true - secrets: - RADIUS_RELEASE_BOT_CLIENT_ID: - description: Release GitHub App client ID. - required: true - RADIUS_RELEASE_BOT_PRIVATE_KEY: - description: Release GitHub App private key. - required: true - -permissions: {} - -jobs: - upmerge: - name: Upmerge to edge - if: github.event_name == 'workflow_dispatch' - runs-on: ubuntu-24.04 - timeout-minutes: 5 - permissions: - contents: read - steps: - # The release App needs Contents, Pull requests and Workflows: Read & Write - # on the caller repository only, not on the shared workflow repository. - - name: Get App Token - id: app-token - uses: actions/create-github-app-token@f418cff399f7aef4c2f0ad47e25ca7a6abbdd6fc # v3.4.0 - with: - client-id: ${{ secrets.RADIUS_RELEASE_BOT_CLIENT_ID }} - private-key: ${{ secrets.RADIUS_RELEASE_BOT_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - repositories: ${{ github.event.repository.name }} - permission-contents: write - permission-pull-requests: write - permission-workflows: write - - - name: Get bot details - id: bot-details - uses: raven-actions/bot-details@ee8966a9ff6e7e42cbfc4a56b4ddb60a9d1b40a6 # v1.2.0 - with: - bot-slug-name: ${{ steps.app-token.outputs.app-slug }} - set-env: false - - - name: Checkout edge - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: edge - token: ${{ steps.app-token.outputs.token }} - fetch-depth: 0 - # Refresh both branch heads with this short-lived token. - persist-credentials: true - - - name: Prepare upmerge - id: prepare - shell: bash - env: - SOURCE_REF: ${{ github.ref }} - PRESERVE_PATHS: ${{ inputs.preserve-paths }} - # Git requires an identity even for --squash --no-commit. - GIT_COMMITTER_NAME: ${{ steps.bot-details.outputs.name }} - GIT_COMMITTER_EMAIL: ${{ steps.bot-details.outputs.email }} - run: | - set -euo pipefail - export GIT_LITERAL_PATHSPECS=1 - if [[ "${SOURCE_REF}" != refs/heads/* ]] || - ! git check-ref-format "${SOURCE_REF}"; then - echo "::error::Select a source branch for the upmerge, not a tag or commit." - exit 1 - fi - - preserve_paths=() - while IFS= read -r path || [[ -n "${path}" ]]; do - path="${path%$'\r'}" - if [[ -z "${path}" ]]; then - continue - fi - if [[ "${path}" == *\\* || "${path}" == *:* || - "/${path}/" == *"/../"* || "/${path}/" == *"/./"* || - "/${path}/" == *"/.git/"* || "/${path}/" == *"//"* || - "${path}" =~ [[:cntrl:]] ]]; then - echo "::error::preserve-paths must contain literal repository-relative file paths without traversal." - exit 1 - fi - preserve_paths+=("${path}") - done <<< "${PRESERVE_PATHS}" - if [[ "${#preserve_paths[@]}" -eq 0 ]]; then - echo "::error::At least one preserved file path is required." - exit 1 - fi - - BRANCH=$(git symbolic-ref --short HEAD) - STATUS=$(git status --porcelain --untracked-files=all) - if [[ "${BRANCH}" != "edge" || -n "${STATUS}" ]]; then - echo "::error::Upmerge preparation requires a clean edge checkout." - exit 1 - fi - # github.sha remains the original event SHA when a run is retried. - git fetch --atomic --no-tags origin \ - "+${SOURCE_REF}:refs/upmerge/source" \ - "+refs/heads/edge:refs/remotes/origin/edge" - SOURCE_SHA=$(git rev-parse --verify "refs/upmerge/source^{commit}") - BASE_SHA=$(git rev-parse --verify "refs/remotes/origin/edge^{commit}") - git checkout -B edge "${BASE_SHA}" - { - echo "source-sha=${SOURCE_SHA}" - echo "base-sha=${BASE_SHA}" - } >> "${GITHUB_OUTPUT}" - { - echo "## Upmerge inputs" - echo - echo "Source: \`${SOURCE_REF#refs/heads/}\` at \`${SOURCE_SHA}\`." - echo "Edge snapshot: \`${BASE_SHA}\`." - echo - echo "Both branch heads were refreshed for this attempt." - } >> "${GITHUB_STEP_SUMMARY}" - for revision in "${BASE_SHA}" "${SOURCE_SHA}"; do - for path in "${preserve_paths[@]}"; do - entry=$(git ls-tree "${revision}" -- "${path}") - if [[ "${entry}" == "040000 tree "* ]]; then - echo "::error::preserve-paths accepts file paths, not directories." - exit 1 - fi - done - done - - restore_edge_files() { - local path original - for path in "${preserve_paths[@]}"; do - original=$(git ls-tree "${BASE_SHA}" -- "${path}") - if [[ -n "${original}" ]]; then - git restore --source="${BASE_SHA}" --staged --worktree -- "${path}" - else - git rm --force --ignore-unmatch -- "${path}" - fi - done - } - - MERGE_STATUS=0 - git merge --squash --no-commit "${SOURCE_SHA}" || MERGE_STATUS=$? - UNMERGED=$(git ls-files --unmerged) - case "${MERGE_STATUS}:${UNMERGED:+conflicts}" in - 0: | 1:conflicts) ;; - *) - echo "::error::Git merge failed without a valid content-conflict result." - exit 1 - ;; - esac - - restore_edge_files - UNMERGED=$(git ls-files --unmerged) - if [[ -n "${UNMERGED}" ]]; then - echo "::error::Upmerge has content conflicts. Resolve them on the source or edge branch, then resume the release. No pull request was created." - git diff --name-only --diff-filter=U - { - echo "## Upmerge requires conflict resolution" - echo - echo "Source: \`${SOURCE_SHA}\`; edge: \`${BASE_SHA}\`." - echo - echo "No provisional snapshot or draft pull request was created." - echo "Resolve these conflicts before resuming:" - echo - echo '```text' - git diff --name-only --diff-filter=U - echo '```' - } >> "${GITHUB_STEP_SUMMARY}" - exit 1 - fi - - UNMERGED=$(git ls-files --unmerged) - HEAD_SHA=$(git rev-parse --verify HEAD) - if [[ -n "${UNMERGED}" || "${HEAD_SHA}" != "${BASE_SHA}" ]]; then - echo "::error::Preparation left unmerged files or changed the edge parent." - exit 1 - fi - - DIFF_STATUS=0 - git diff --cached --quiet "${BASE_SHA}" -- || DIFF_STATUS=$? - case "${DIFF_STATUS}" in - 0) - HAS_CHANGES=false - echo "No changes to upmerge to edge." - ;; - 1) HAS_CHANGES=true ;; - *) - echo "::error::Unable to determine the prepared upmerge diff." - exit 1 - ;; - esac - { - echo "has-changes=${HAS_CHANGES}" - } >> "${GITHUB_OUTPUT}" - - # The release coordinator discovers this exact step name and its time window. - # Do not override author/committer: GitHub signs as the authenticated App. - - name: Create pull request - id: pull-request - if: steps.prepare.outputs.has-changes == 'true' - uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3 - with: - token: ${{ steps.app-token.outputs.token }} - sign-commits: true - commit-message: | - Upmerge ${{ github.ref_name }} to edge - - Signed-off-by: ${{ steps.bot-details.outputs.name }} <${{ steps.bot-details.outputs.email }}> - branch: upmerge/${{ github.run_id }}-${{ github.run_attempt }} - base: edge - title: Upmerge to edge - draft: false - body: | - Upmerge to edge (kicked off by @${{ github.triggering_actor }}). - - Source: `${{ github.ref_name }}` at `${{ steps.prepare.outputs.source-sha }}`. - Edge snapshot: `${{ steps.prepare.outputs.base-sha }}`. - - Prepared the clean merged tree, preserving changes from both branches without importing source commit history. - - These files retain their edge state, including absence or deletion: - - ```text - ${{ inputs.preserve-paths }} - ``` - - Normal review and branch rules still apply. - - - name: Require signed pull request - if: steps.prepare.outputs.has-changes == 'true' - shell: bash - env: - COMMITS_VERIFIED: ${{ steps.pull-request.outputs.pull-request-commits-verified }} - PR_NUMBER: ${{ steps.pull-request.outputs.pull-request-number }} - PR_URL: ${{ steps.pull-request.outputs.pull-request-url }} - PR_HEAD_SHA: ${{ steps.pull-request.outputs.pull-request-head-sha }} - run: | - set -euo pipefail - if [[ "${COMMITS_VERIFIED}" != "true" || -z "${PR_NUMBER}" || - -z "${PR_URL}" || -z "${PR_HEAD_SHA}" ]]; then - echo "::error::The action did not return a GitHub-verified commit and pull request." - exit 1 - fi diff --git a/eng/SYNC.md b/eng/SYNC.md index 3244b71..1b160a9 100644 --- a/eng/SYNC.md +++ b/eng/SYNC.md @@ -28,7 +28,6 @@ This document describes the centralized file synchronization used across the `ra - [PR Author Assignment (Radius PoC)](#pr-author-assignment-radius-poc) - [PR Status Labels](#pr-status-labels) - [Labels](#labels) - - [Signed Release Upmerge](#signed-release-upmerge) - [Release Backports](#release-backports) - [Lockfile Registry Policy](#lockfile-registry-policy) - [Adding New Files to Sync](#adding-new-files-to-sync) @@ -272,7 +271,6 @@ Files in `.github/workflows/` that are intended to be **reusable workflows** (ca | `__pr-status-labels.yml` | Applies PR lifecycle labels | | `__pr-holds.yml` | Fails when a PR carries a manual hold label | | `__labels.yml` | Applies a repository's synced labels file | -| `__upmerge.yml` | Creates signed release-to-edge net-diff PRs | ### Workflow Relationship Diagram @@ -323,7 +321,7 @@ PR lifecycle labeling is maintained in [the PR Status Labels action](../.github/ The dedicated PR status labels group in `.github/sync.yml` enrolls **`radius-project/.github`, `ai-extensions`, `dashboard`, `docs@edge`, `lab`, `radius`, `recipes`, `resource-types-contrib`, and `website`**. Add a repository to that group only after its own lifecycle-label workflows are removed, so only one writer updates its labels. See [Opting a repository in](../.github/actions/pr-status-labels/README.md#opting-a-repository-in). -`docs` is synced to `edge`, which is not its default branch. PRs into `edge` are labeled as soon as the sync pull request merges, but scheduled reconciliation, review-triggered updates, and the label sync run only from the default branch, so they start once the next release branch is cut from `edge`. See [Limitations](../.github/actions/pr-status-labels/README.md#limitations). +`docs` is synced to `edge`, its default branch. The release-impact check (`PR Required Labels`) is Radius-only and is not part of this group. @@ -336,33 +334,11 @@ Label definitions are managed only in this repository and synced to `.github/lab Repositories must not edit their synced `.github/labels.yml`; change the template or `repo_labels` instead, and the Sync workflow opens a pull request with the rendered file. When that pull request merges, the synced `Labels` workflow applies the file with `skip-delete`, so labels the file does not list are preserved. The workflow also reverts manual edits to the labels the file defines. Renaming lifecycle labels through the `PR_STATUS_LABELS` variable needs matching definitions in `repo_labels`, each with `from_name` set to the old name. See [Label catalog](../.github/actions/pr-status-labels/README.md#label-catalog). -### Signed Release Upmerge - -Release upmerge logic lives inline in [`__upmerge.yml`](../.github/workflows/__upmerge.yml). The thin native [samples caller](../workflow-templates/upmerge-samples.yml) is synced as-is to **`.github/workflows/upmerge.yaml`**; the release coordinator depends on that filename and the inner step name **`Create pull request`**. The shared implementation is not copied into consumer repositories. - -The dedicated mapping in `.github/sync.yml` enrolls only **`radius-project/samples@edge`**. Its caller passes `bicepconfig.json` as the `preserve-paths` input. Manage that input in the native caller YAML here, not in the synced caller downstream. Docs no longer uses upmerge after its GitHub Pages migration. - -| Caller parameter | Contract | -| --- | --- | -| `preserve-paths` input | Required newline-delimited list of literal repository-relative file paths. Use `/` separators; blank lines and CRLF lists are accepted. Absolute paths, traversal, `.git` components, backslashes, pathspec prefixes and directories are rejected. Files retain their edge state, including absence or deletion. | -| `RADIUS_RELEASE_BOT_CLIENT_ID` secret | Required release GitHub App client ID, passed explicitly by the caller. | -| `RADIUS_RELEASE_BOT_PRIVATE_KEY` secret | Required release GitHub App private key, passed explicitly by the caller. | - -Callers expose only `workflow_dispatch` and grant the reusable job `contents: read`. The App installation must already have Contents, Pull requests and Workflows write access to the caller repository. Its short-lived token is scoped to that repository only; it needs no installation on `.github`. No new grants or secrets are provisioned by the workflow. - -The workflow uses the caller's repository and selected source branch. Every attempt, including a rerun, fetches the latest source and `edge` branch heads together, then prepares a native Git squash from those exact commits without importing source ancestry. GitHub's original event `github.sha` is not used as the content source. The attempt summary and PR body record the resolved source and edge SHAs; commits pushed after that fetch are included by the next attempt. A missing branch or fetch error stops the run instead of falling back to an older commit. The pinned create-pull-request action publishes one App-signed net-diff commit with an explicit App DCO trailer. Only the preparation step receives a committer identity; the signing action's author and committer are not overridden. The native `pull-request-commits-verified` output and returned PR details must confirm publication. - -A clean merge preserves both branches' changes and opens a **ready-for-review** PR. Conflicts confined to preserved files are resolved using edge's state without discarding other merged content. Other content conflicts stop the run and list the affected files in its log and summary; no draft or provisional source snapshot is published. Resolve the conflicting changes on either branch through normal review, then rerun: fixes merged into either the selected source branch or `edge` are picked up by the new attempt. Unrelated Git failures also stop the run. A genuine no-op **skips `Create pull request`**, so the coordinator does not discover an old or empty PR. Review and branch rules still apply. - -Callers follow the organization's `@main` convention: new runs receive shared logic updates without another caller sync. Workflow-code selection is separate from the branch-content refresh above. [GitHub's rerun rules](https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations#behavior-of-reusable-workflows-when-re-running-jobs) distinguish rerunning failed/specific jobs, which reuse the first attempt's shared-workflow commit, from rerunning all jobs, which resolves `@main` again. For a run created before the fresh-head behavior was deployed, choose **Re-run all jobs** to load it; a failed-job retry can still execute the old implementation. Runs created with the new implementation refresh both content heads on every retry. Historical inline runs do not adopt the new caller by retrying; recorded release receipts are not rewritten. - -Caller updates stay enrolled only on edge; future samples release branches inherit them when cut. Do not add permanent sync mappings for old release branches. - ### Release Backports [`__release-backport.yml`](../.github/workflows/__release-backport.yml) and the [Release Backport action](../.github/actions/release-backport/action.yml) maintain the shared implementation. The reusable workflow loads the action with `$/`, keeping its scripts at the same commit as the workflow. Only the native [`release-backport.yml` caller](../workflow-templates/release-backport.yml) is synced to `.github/workflows/release-backport.yaml` in **`radius`, `bicep-types-aws`, `dashboard`, and `recipes`**. -These repositories develop on `main`, squash-merge source PRs, and selectively backport to existing `release/X.Y` branches. This does not enroll docs or samples: samples uses `vX.Y`-to-`edge` upmerge and docs uses a different release process. A repository using this backport model can be enrolled by adding it to the dedicated sync group; do not change the generic caller per repository. +These repositories develop on `main`, squash-merge source PRs, and selectively backport to existing `release/X.Y` branches. This does not enroll docs or samples: both develop on `edge`, their default branch, and backport selected fixes to `vX.Y` with separate pull requests. This shared backport automation covers only `main` to `release/X.Y`. A repository using this backport model can be enrolled by adding it to the dedicated sync group; do not change the generic caller per repository. Apply `backport release/X.Y` to a PR merged into that repository's `main`. Labels may also be applied before merge. The workflow selects pending sources in main's first-parent merge order and opens one backport PR per channel at a time. Rebase-merge the reviewed backport to preserve its source title and exact cherry-pick trailer; the release-branch push starts the next queued item. Already-included source commits and verified merged backports are skipped. No branch is created, no backport is merged automatically, and closing a backport without resolving its existing automation branch requires manual reconciliation. @@ -374,7 +350,7 @@ gh workflow run release-backport.yaml --repo radius-project/recipes --ref main - This processes the same labeled queue; it does not select unmerged PRs or infer which fixes belong in a release. Ordinary successful backports are ready for review. A conflicting backport remains a draft containing only a handoff document on the unchanged release base, not a provisional source snapshot. Follow its exact recovery commands before marking it ready. -Each caller must have access to `RADIUS_RELEASE_BOT_CLIENT_ID` and `RADIUS_RELEASE_BOT_PRIVATE_KEY`, either as repository secrets or approved organization secrets. The App needs Contents, Workflows, Issues, and Pull requests write access on each enrolled repository; its token is scoped to that repository only. GitHub's job token needs only Contents, Issues, and Pull requests read. The workflow checks out trusted `main`, never a PR head, and executes the centrally maintained action. Backports retain the existing Radius source-author and DCO contract rather than replacing the author with the App for cryptographic signing. They are not the App-signed upmerge commits described above. +Each caller must have access to `RADIUS_RELEASE_BOT_CLIENT_ID` and `RADIUS_RELEASE_BOT_PRIVATE_KEY`, either as repository secrets or approved organization secrets. The App needs Contents, Workflows, Issues, and Pull requests write access on each enrolled repository; its token is scoped to that repository only. GitHub's job token needs only Contents, Issues, and Pull requests read. The workflow checks out trusted `main`, never a PR head, and executes the centrally maintained action. Backports retain the existing Radius source-author and DCO contract rather than replacing the author with the App for cryptographic signing. Merge this shared implementation first, then review the normal Sync PRs in the four repositories. Create each supported channel's `backport release/X.Y` label if absent and allow rebase merges on `release/*`. Existing release branches also need the thin caller before their push events can advance the queue: label the merged caller-sync PR for those channels and merge its generated backports, or reconcile the channel manually from `main` until that bootstrap completes. New release branches inherit the caller; do not add permanent version-specific sync mappings. Retain Radius's required release-branch provenance check and all normal review rules. @@ -388,7 +364,7 @@ Run `node --test .github/actions/*/*.test.mjs` in this repository with Node.js, [`__lockfile-registry-policy.yml`](../.github/workflows/__lockfile-registry-policy.yml) checks registry references in tracked lockfiles and package-source configuration, using the [shared action](../.github/actions/lockfile-registry-policy/README.md) from the same commit. The defaults block `*.pkgs.visualstudio.com` and `pkgs.dev.azure.com`. Repositories can replace the list using the `LOCKFILE_BLOCKED_REGISTRIES` Actions variable; hostname and HTTP(S) URL patterns support `*` and `?`. -The lockfile registry policy group in [`.github/sync.yml`](../.github/sync.yml) enrolls **all currently unarchived organization repositories**. The existing [Sync workflow](../.github/workflows/sync.yml) distributes [the thin caller](../workflow-templates/lockfile-registry-policy.yml) through its normal pull requests and `repo-sync` branch prefix; no separate sync workflow is needed. `docs` and `samples` retain their `edge` targets, while other repositories use their default branches. Other shared-file groups are unchanged. +The lockfile registry policy group in [`.github/sync.yml`](../.github/sync.yml) enrolls **all currently unarchived organization repositories**. The existing [Sync workflow](../.github/workflows/sync.yml) distributes [the thin caller](../workflow-templates/lockfile-registry-policy.yml) through its normal pull requests and `repo-sync` branch prefix; no separate sync workflow is needed. `docs` and `samples` keep their explicit `edge` targets, which are their default branches, and other repositories use their default branches. Other shared-file groups are unchanged. Merge the shared implementation first, then merge the generated downstream sync PRs to activate checks. The Files Sync App must have access to every listed repository, including private and internal repositories, and permission to update workflow files. Maintain the group's repository list as repositories are added or archived. See the action documentation for package-manager coverage, override precedence, binary-file behavior, and the limits of checking committed source references without restoring dependencies. @@ -437,7 +413,7 @@ The sync targets repositories defined in `.github/sync.yml`. Example structure: | `radius-project/samples` | **edge** | Custom branch example | | ... | ... | Add all repositories to sync | -> **Note:** Use `@branch` syntax in `sync.yml` to specify non-default branches (e.g., `radius-project/docs@edge`). +> **Note:** Use `@branch` syntax in `sync.yml` to target a specific branch (e.g., `radius-project/docs@edge`). --- diff --git a/workflow-templates/upmerge-samples.yml b/workflow-templates/upmerge-samples.yml deleted file mode 100644 index 508caf9..0000000 --- a/workflow-templates/upmerge-samples.yml +++ /dev/null @@ -1,26 +0,0 @@ -# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json -# ------------------------------------------------------------------------------ -# This file is synced from the radius-project/.github repository. -# DO NOT EDIT MANUALLY - changes will be overwritten by the next sync. -# Source: https://github.com/radius-project/.github -# Docs: https://github.com/radius-project/.github/blob/main/eng/SYNC.md#signed-release-upmerge -# ------------------------------------------------------------------------------ ---- -name: Upmerge to edge - -on: - workflow_dispatch: - -permissions: {} - -jobs: - upmerge: - uses: radius-project/.github/.github/workflows/__upmerge.yml@main - permissions: - contents: read - with: - preserve-paths: | - bicepconfig.json - secrets: - RADIUS_RELEASE_BOT_CLIENT_ID: ${{ secrets.RADIUS_RELEASE_BOT_CLIENT_ID }} - RADIUS_RELEASE_BOT_PRIVATE_KEY: ${{ secrets.RADIUS_RELEASE_BOT_PRIVATE_KEY }}