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..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" @@ -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' }}