Skip to content

chore: make workflow branch filters and guards branch-agnostic - #8

Merged
jcant0n merged 1 commit into
masterfrom
chore/branch-agnostic-workflows
Aug 1, 2026
Merged

chore: make workflow branch filters and guards branch-agnostic#8
jcant0n merged 1 commit into
masterfrom
chore/branch-agnostic-workflows

Conversation

@jcant0n

@jcant0n jcant0n commented Aug 1, 2026

Copy link
Copy Markdown
Member

Preparación para renombrar la rama por defecto de master a main.

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.yml asumen main. Este repo es una de las 4 excepciones.

Aquí Sync standards funciona hoy, pero solo porque alguien acertó a escribir 'master' a mano en target_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

  • CI: los filtros de push y pull_request aceptan main y master, para que no haya ninguna ventana sin CI durante el rename.
  • CD y Sync standards: el guard pasa de github.ref == 'refs/heads/master' a github.ref_name == github.event.repository.default_branch, que se resuelve en tiempo de ejecución y sobrevive a cualquier rename futuro.
  • Sync standards: target_branch se 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

  1. Renombrar mastermain. El PR Add library loading overloads to support linux #7, abierto contra master, lo retargetea GitHub automáticamente.
  2. Lanzar Sync standards a mano para confirmar que sigue verde.
  3. PR de limpieza dejando branches: [ "main" ].

🤖 Generated with Claude Code

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>
@jcant0n
jcant0n merged commit 5d2c5a1 into master Aug 1, 2026
1 check passed
@jcant0n
jcant0n deleted the chore/branch-agnostic-workflows branch August 1, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant