Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
10 changes: 9 additions & 1 deletion .github/workflows/sync_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.<job_id>.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:
Expand All @@ -21,7 +29,7 @@ env:

jobs:
sync-branches:
if: ${{ inputs.pat_token != '' }}
if: ${{ inputs.enabled }}
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down