Files
Mujoco_WASM/.github/workflows/update_live.yml
T
Michael Moss 2012646711 Don't do a shallow clone, to avoid "fast-forward" push confusion.
PiperOrigin-RevId: 940727059
Change-Id: Id3c6c7c6a3fa1288ed091e49afc073b74f0bbd9c
2026-06-30 16:43:35 -07:00

29 lines
678 B
YAML

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
with:
fetch-depth: 0
- 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