From 929d9abeb4dd9c61b02cd2a4a369261a12e591ec Mon Sep 17 00:00:00 2001 From: Michael Moss Date: Sun, 21 Jun 2026 09:06:20 -0700 Subject: [PATCH] Add action to sync `live` branch on each release. PiperOrigin-RevId: 935649160 Change-Id: Ic36b06fef1865ecee63f12faba0eb5d49914362b --- .github/workflows/update_live.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/update_live.yml diff --git a/.github/workflows/update_live.yml b/.github/workflows/update_live.yml new file mode 100644 index 00000000..72f7f39b --- /dev/null +++ b/.github/workflows/update_live.yml @@ -0,0 +1,26 @@ +name: update-live + +on: + release: + types: [published] # Trigger when publishing releases ... + workflow_dispatch: # or manually (updates to main HEAD). + +permissions: + contents: write + +jobs: + merge-branch: + runs-on: ubuntu-latest + steps: + - name: Checkout MuJoCo + uses: actions/checkout@v4 + + - name: Fast-forward the live branch + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + git fetch origin main:refs/remotes/origin/main + REF_NAME="origin/main" + else + REF_NAME="${{ github.ref_name }}" + fi + git push origin ${REF_NAME}:refs/heads/live