Merge pull request #451 from Psychotoxical/fix/promote-main-to-next-skip-ci-non-main

fix(ci): skip promote-main-to-next check gate for non-main sources
This commit is contained in:
cucadmuh
2026-05-04 18:12:08 +03:00
committed by GitHub
+7 -1
View File
@@ -4,7 +4,7 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
source_branch: source_branch:
description: "Source branch to promote into next (default main)" description: "Source branch to promote into next (default main). Required ci-ok checks run only when this is main."
required: false required: false
default: main default: main
type: string type: string
@@ -16,6 +16,7 @@ on:
jobs: jobs:
validate-main: validate-main:
if: inputs.source_branch == 'main'
uses: ./.github/workflows/validate-main-green-ci.yml uses: ./.github/workflows/validate-main-green-ci.yml
with: with:
branch: ${{ inputs.source_branch }} branch: ${{ inputs.source_branch }}
@@ -23,6 +24,7 @@ jobs:
promote: promote:
needs: validate-main needs: validate-main
if: ${{ !cancelled() && (needs.validate-main.result == 'success' || needs.validate-main.result == 'skipped') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
@@ -30,6 +32,10 @@ jobs:
env: env:
SOURCE_BRANCH: ${{ inputs.source_branch }} SOURCE_BRANCH: ${{ inputs.source_branch }}
steps: steps:
- name: note when CI gate was skipped
if: inputs.source_branch != 'main'
run: |
echo "Skipping required-check validation: source_branch is '${{ inputs.source_branch }}', not main."
- uses: actions/checkout@v5 - uses: actions/checkout@v5
with: with:
fetch-depth: 0 fetch-depth: 0