From 032f4910d21e734ac1e8afb7eb7fd3a443681869 Mon Sep 17 00:00:00 2001 From: jcant0n Date: Sat, 1 Aug 2026 13:59:08 +0200 Subject: [PATCH 1/2] chore: make workflow branch filters and guards branch-agnostic 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 'main' literal. That literal is why this workflow has been failing every month since April 2026: the reusable workflow checks out `ref: target_branch` and this repository's default branch is master, so the checkout could never resolve. Co-Authored-By: Claude Opus 5 --- .github/workflows/CI.yml | 4 ++-- .github/workflows/cd.yml | 2 +- .github/workflows/sync-standards.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6288153..3a33afc 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,9 +14,9 @@ on: type: boolean default: false push: - branches: [ "master" ] + branches: [ "main", "master" ] pull_request: - branches: [ "master" ] + branches: [ "main", "master" ] jobs: ci: diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d4d9155..9ce7aa9 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -16,7 +16,7 @@ on: jobs: publish: - if: github.event_name != 'schedule' || github.ref == 'refs/heads/master' + if: github.event_name != 'schedule' || github.ref_name == github.event.repository.default_branch uses: EvergineTeam/evergine-standards/.github/workflows/binding-simple-cd.yml@v2 with: generator-project: "WebGPUGen/WebGPUGen/WebGPUGen.csproj" # Path to your generator .csproj diff --git a/.github/workflows/sync-standards.yml b/.github/workflows/sync-standards.yml index 2fc0c1e..5aa86db 100644 --- a/.github/workflows/sync-standards.yml +++ b/.github/workflows/sync-standards.yml @@ -41,7 +41,7 @@ on: jobs: sync: - if: github.event_name != 'schedule' || github.ref == 'refs/heads/master' + if: github.event_name != 'schedule' || github.ref_name == github.event.repository.default_branch permissions: contents: write # allow push commits pull-requests: write @@ -50,7 +50,7 @@ jobs: org: ${{ github.event.inputs.org || 'EvergineTeam' }} repo: ${{ github.event.inputs.repo || 'evergine-standards' }} ref: ${{ github.event.inputs.ref || 'main' }} - target_branch: ${{ github.event.inputs.target_branch || 'main' }} + target_branch: ${{ github.event.inputs.target_branch || github.event.repository.default_branch }} script_path: ${{ github.event.inputs.script_path || 'sync-standards.ps1' }} commit_message: "${{ github.event.inputs.commit_message || vars.STANDARDS_COMMIT_MESSAGE || 'auto: sync standard files [skip ci]' }}" mode: ${{ github.event.inputs.mode || 'auto' }} From 33ae58394523eeb348b519598638d5edcca962ab Mon Sep 17 00:00:00 2001 From: jcant0n Date: Sat, 1 Aug 2026 14:01:55 +0200 Subject: [PATCH 2/2] chore: default target_branch input to the repository default branch Empty default so a manual run with the field left blank resolves to the repository default branch instead of a hardcoded name. Co-Authored-By: Claude Opus 5 --- .github/workflows/sync-standards.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-standards.yml b/.github/workflows/sync-standards.yml index 5aa86db..3051a8e 100644 --- a/.github/workflows/sync-standards.yml +++ b/.github/workflows/sync-standards.yml @@ -16,8 +16,8 @@ on: default: "v2" required: false target_branch: - description: "Target branch to apply changes" - default: "main" + description: "Target branch to apply changes (defaults to the repository default branch)" + default: "" required: false script_path: description: "Path where to download the sync script"