mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
133e09ec63
GitHub does not fire push workflows for commits pushed with the default actions token. Chain Next/Release channel workflows from the matching promote workflow_run on success. Made-with: Cursor
26 lines
861 B
YAML
26 lines
861 B
YAML
name: Next Channel
|
|
|
|
# Pushes made with the default GITHUB_TOKEN from another workflow (e.g. Promote main to next)
|
|
# do not trigger push workflows — GitHub blocks recursive runs. Use workflow_run below.
|
|
on:
|
|
push:
|
|
branches: [next]
|
|
workflow_dispatch:
|
|
workflow_run:
|
|
workflows: ["Promote main to next"]
|
|
types: [completed]
|
|
|
|
jobs:
|
|
publish-next:
|
|
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
|
|
uses: ./.github/workflows/reusable-channel-publish.yml
|
|
with:
|
|
channel: next
|
|
# workflow_run uses default-branch context; ref_name would be wrong — always build `next`
|
|
source_ref: ${{ github.event_name == 'workflow_run' && 'next' || github.ref_name }}
|
|
target_branch: next
|
|
prerelease: true
|
|
draft_release: false
|
|
verify_nix: true
|
|
secrets: inherit
|