From 06ce44e97dc2c9159af2121498e0cd70c9bc88b0 Mon Sep 17 00:00:00 2001 From: petesramek <2333452+petesramek@users.noreply.github.com> Date: Thu, 29 Oct 2026 16:27:53 +0000 Subject: [PATCH] Unlock branch rulesets around docs metadata push in build workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02d4dd61..a051404c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -250,9 +250,23 @@ jobs: docfx-json-manifest: './api-reference/assembly-metadata.json' temporary-directory: './api-reference/temp' output-directory: './api-reference/${{ env.friendly-version }}' + - name: 'Unlock branch for assembly metadata push' + id: unlock-branch + uses: ./.github/actions/github/branch-protection/unlock + with: + branch: ${{ github.ref_name }} + token: ${{ secrets.GH_ADMIN_TOKEN }} + fail-on-error: 'true' - name: 'Push assembly metadata artifact' uses: ./.github/actions/git/push-changes with: artifact-name: 'assembly-metadata' commit-message: 'Updated docs for version ${{ env.friendly-version }}' working-directory: './api-reference/${{ env.friendly-version }}' + - name: 'Restore branch protection' + if: ${{ always() && steps.unlock-branch.outputs.ruleset-ids != '' }} + uses: ./.github/actions/github/branch-protection/lock + with: + branch: ${{ github.ref_name }} + token: ${{ secrets.GH_ADMIN_TOKEN }} + ruleset-ids: ${{ steps.unlock-branch.outputs.ruleset-ids }}