Skip to content

Commit f4c1c6f

Browse files
committed
add ability to pass base-branch from calling workflows
1 parent 4e8195c commit f4c1c6f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/soup-check-changes-and-generate.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ env:
44

55
on:
66
workflow_call:
7+
inputs:
8+
base-branch:
9+
description: 'The base branch to compare changes against'
10+
required: false
11+
type: string
12+
default: 'main'
713
jobs:
814
generate-missing:
915
runs-on: [self-hosted, Linux]
@@ -17,4 +23,4 @@ jobs:
1723
repository: ${{ github.event.repository.name }}
1824
gh-api-token: ${{ env.GH_API_TOKEN }}
1925
soup-approvers: ${{ vars.SOUP_APPROVERS }}
20-
base-branch: origin/${{ github.event.pull_request.base.ref || 'main' }}
26+
base-branch: origin/${{ github.event.pull_request.base.ref || inputs.base-branch || 'main' }}

.github/workflows/soup-generate-all-missing.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ env:
44

55
on:
66
workflow_call:
7+
inputs:
8+
base-branch:
9+
description: 'The base branch to compare against (e.g., main)'
10+
required: false
11+
default: 'main'
712
jobs:
813
generate-missing:
914
runs-on: [self-hosted, Linux]
@@ -19,3 +24,4 @@ jobs:
1924
repository: ${{ github.event.repository.name }}
2025
gh-api-token: ${{ env.GH_API_TOKEN }}
2126
soup-approvers: ${{ vars.SOUP_APPROVERS }}
27+
base-branch: ${{ inputs.base-branch }}

0 commit comments

Comments
 (0)