open-swe/.github/workflows/promote_dev_to_prod.yml
Adam Moussa 5a5818f4c2
ci: promote dev → main (prod), not a separate prod branch (#3)
Aligns the promotion target with the locked migration architecture
(main = PROD, dev = integration). Plain ref push is fast-forward-only;
branch protection on main rejects non-FF pushes, so a diverged main
fails loudly instead of force-moving prod.
2026-06-26 13:49:02 -04:00

27 lines
612 B
YAML

name: Promote dev to main (prod)
permissions:
contents: write
on:
schedule:
- cron: "0 8 * * *"
workflow_dispatch:
concurrency:
group: promote-dev-to-main
cancel-in-progress: false
jobs:
promote:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: dev
fetch-depth: 0
- name: Fast-forward main (PROD) to dev
# main is the production branch; a plain ref push is fast-forward-only
# (branch protection rejects non-FF), so a diverged main fails loudly.
run: |
git push origin HEAD:refs/heads/main