chore: make workflow branch filters and guards branch-agnostic - #8
Merged
Conversation
Prepares the repository for renaming the default branch from master to main without losing CI coverage or silently skipping scheduled jobs. - CI: accept both main and master in push/pull_request filters so there is no window without CI during the rename. - CD and Sync standards: replace the hardcoded `github.ref == 'refs/heads/master'` guard with `github.ref_name == github.event.repository.default_branch`, which resolves at runtime and survives any future rename. With the old guard, a rename would make the scheduled job skip while the run still reported success. - Sync standards: derive target_branch from the repository default branch instead of the 'master' literal, so it stays correct after the rename. Two sibling repositories (OpenGL.NET, WebGPU.NET) have had this workflow failing since April 2026 precisely because that literal drifted from the actual branch name. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preparación para renombrar la rama por defecto de
masteramain.Por qué
De los 15 repos de la flota de bindings, 11 ya usan
main, y tanto las plantillas oficiales (evergine-standards-template-*) como el default de_sync-standards-reusable.ymlasumenmain. Este repo es una de las 4 excepciones.Aquí
Sync standardsfunciona hoy, pero solo porque alguien acertó a escribir'master'a mano entarget_branch. En los repos hermanos OpenGL.NET y WebGPU.NET ese mismo literal quedó en'main'y llevan 4 y 5 meses con el workflow en rojo. El literal es la trampa; lo quitamos.Qué cambia
pushypull_requestaceptanmainymaster, para que no haya ninguna ventana sin CI durante el rename.github.ref == 'refs/heads/master'agithub.ref_name == github.event.repository.default_branch, que se resuelve en tiempo de ejecución y sobrevive a cualquier rename futuro.target_branchse deriva de la rama por defecto del repo; el input queda con default vacío para que un run manual en blanco también resuelva bien.Por qué el guard importa
Si se renombrara la rama sin tocar este
if:, el cron mensual se saltaría el job y el run aparecería en verde: ni publica ni sincroniza, y el badge sigue OK. Ese fallo silencioso es peor que el rojo.Después de mergear
master→main. El PR Add library loading overloads to support linux #7, abierto contramaster, lo retargetea GitHub automáticamente.Sync standardsa mano para confirmar que sigue verde.branches: [ "main" ].🤖 Generated with Claude Code