mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +00:00
Merge pull request #449 from Psychotoxical/fix/workflows-promote-main-to-next-source-branch
fix(ci): honor source_branch in promote-main-to-next
This commit is contained in:
@@ -3,6 +3,11 @@ name: Promote main to next
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
|
source_branch:
|
||||||
|
description: "Source branch to promote into next (default main)"
|
||||||
|
required: false
|
||||||
|
default: main
|
||||||
|
type: string
|
||||||
source_only:
|
source_only:
|
||||||
description: "Create/refresh tagged release only (skip platform builds and verify-nix)"
|
description: "Create/refresh tagged release only (skip platform builds and verify-nix)"
|
||||||
required: false
|
required: false
|
||||||
@@ -13,7 +18,7 @@ jobs:
|
|||||||
validate-main:
|
validate-main:
|
||||||
uses: ./.github/workflows/validate-main-green-ci.yml
|
uses: ./.github/workflows/validate-main-green-ci.yml
|
||||||
with:
|
with:
|
||||||
branch: main
|
branch: ${{ inputs.source_branch }}
|
||||||
required_contexts: ci-ok|ci-main / ci-ok
|
required_contexts: ci-ok|ci-main / ci-ok
|
||||||
|
|
||||||
promote:
|
promote:
|
||||||
@@ -22,6 +27,8 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
actions: write
|
actions: write
|
||||||
|
env:
|
||||||
|
SOURCE_BRANCH: ${{ inputs.source_branch }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
@@ -31,12 +38,12 @@ jobs:
|
|||||||
uses: actions/setup-node@v5
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: lts/*
|
node-version: lts/*
|
||||||
- name: fast-forward next to main
|
- name: fast-forward next to source branch tip
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
git fetch origin main next
|
git fetch origin "$SOURCE_BRANCH" next
|
||||||
# Reset channel branch to main snapshot, then create a fresh RC bump commit.
|
# Reset channel branch to source snapshot, then create a fresh RC bump commit.
|
||||||
git reset --hard origin/main
|
git reset --hard "origin/$SOURCE_BRANCH"
|
||||||
- name: bump package version to next RC
|
- name: bump package version to next RC
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|||||||
Reference in New Issue
Block a user