From df62ec5a7ac8f693f75b50ee225b7314950d1c81 Mon Sep 17 00:00:00 2001 From: "Antoine C." Date: Sun, 29 Jun 2025 19:01:48 +0000 Subject: [PATCH] chore(sync-branches): fix regression preventing trigger --- .github/workflows/release.yml | 2 ++ .github/workflows/sync_branches.yml | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cbccfd84a4d6..c7de5a46ce01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,5 +46,7 @@ jobs: sync: if: ${{ github.ref != 'refs/heads/main' }} uses: ./.github/workflows/sync_branches.yml + with: + enabled: ${{ secrets.MIXXX_BRANCH_SYNC_PAT != '' }} secrets: MIXXX_BRANCH_SYNC_PAT: ${{ secrets.MIXXX_BRANCH_SYNC_PAT }} diff --git a/.github/workflows/sync_branches.yml b/.github/workflows/sync_branches.yml index d6d47ab572a7..3a1f3b23e101 100644 --- a/.github/workflows/sync_branches.yml +++ b/.github/workflows/sync_branches.yml @@ -2,6 +2,14 @@ name: Sync Branches on: workflow_call: + inputs: + enabled: + type: boolean + default: true + description: >- + Whether or not to run this workflow. This is a workaround on the 'secrets' context not being + available in 'jobs..if' + (https://docs.github.com/en/actions/reference/accessing-contextual-information-about-workflow-runs#context-availability) secrets: # PAT setup with content:write and pull_request:write MIXXX_BRANCH_SYNC_PAT: @@ -21,7 +29,7 @@ env: jobs: sync-branches: - if: ${{ inputs.pat_token != '' }} + if: ${{ inputs.enabled }} runs-on: ubuntu-latest permissions: contents: write