Skip to content

Commit 82220a4

Browse files
committed
Simplify upmerge workflow to single job with dynamic matrix
1 parent 4be472a commit 82220a4

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

.github/workflows/upmerge_pr.yaml

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ permissions:
2020
pull-requests: write
2121

2222
jobs:
23-
# Scheduled runs or manual without inputs - use matrix
24-
upmerge-matrix:
25-
if: github.repository == 'Sylius/CmsPlugin' && !inputs.base_branch
23+
upmerge:
2624
runs-on: ubuntu-latest
25+
if: github.repository == 'Sylius/CmsPlugin'
2726
name: "Upmerge PR"
2827
timeout-minutes: 5
2928
strategy:
3029
fail-fast: false
3130
matrix:
32-
include:
33-
-
34-
base_branch: "1.0"
35-
target_branch: "1.1"
31+
include: ${{ inputs.base_branch && fromJson(format('[{"base_branch":"{0}","target_branch":"{1}"}]', inputs.base_branch, inputs.target_branch)) || fromJson('[{"base_branch":"1.0","target_branch":"1.1"}]') }}
3632

3733
steps:
3834
-
@@ -46,23 +42,3 @@ jobs:
4642
base_branch: ${{ matrix.base_branch }}
4743
target_branch: ${{ matrix.target_branch }}
4844
token: ${{ secrets.SYLIUS_BOT_PAT }}
49-
50-
# Manual with custom inputs
51-
upmerge-custom:
52-
if: github.repository == 'Sylius/CmsPlugin' && inputs.base_branch
53-
runs-on: ubuntu-latest
54-
name: "Upmerge PR (${{ inputs.base_branch }} -> ${{ inputs.target_branch }})"
55-
timeout-minutes: 5
56-
57-
steps:
58-
-
59-
uses: actions/checkout@v4
60-
with:
61-
ref: ${{ inputs.target_branch }}
62-
63-
-
64-
uses: SyliusLabs/UpmergeAction@v1
65-
with:
66-
base_branch: ${{ inputs.base_branch }}
67-
target_branch: ${{ inputs.target_branch }}
68-
token: ${{ secrets.SYLIUS_BOT_PAT }}

0 commit comments

Comments
 (0)