-
Notifications
You must be signed in to change notification settings - Fork 7
98 lines (91 loc) · 3.06 KB
/
manual_versioning.yml
File metadata and controls
98 lines (91 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Manual version PRs
on:
workflow_dispatch:
inputs:
shopware_version:
description: "Shopware version"
required: true
type: string
php_version:
description: "PHP version"
required: false
type: string
default: "8.2"
trigger_default_schema:
description: "Trigger schema"
required: false
type: boolean
default: true
trigger_commercial_schema:
description: "Trigger commercial schema"
required: false
type: boolean
default: true
trigger_digitalsalesroom_schema:
description: "Trigger digitalsalesroom schema"
required: false
type: boolean
default: true
trigger_customproducts_schema:
description: "Trigger custom products schema"
required: false
type: boolean
default: true
jobs:
guard:
name: "Check version matches branch"
runs-on: ubuntu-22.04
outputs:
proceed: ${{ steps.check.outputs.proceed }}
steps:
- id: check
env:
VERSION: ${{ inputs.shopware_version }}
BRANCH: ${{ github.ref_name }}
run: |
# Map branch -> expected version pattern. Bump `latest` when it moves.
case "$BRANCH" in
latest) expected='^v?6\.7\.' ;;
v6.6) expected='^v?6\.6\.' ;;
main|trunk) expected='.*' ;;
*) expected='.*' ;;
esac
if [[ "$VERSION" =~ $expected ]]; then
echo "proceed=true" >> "$GITHUB_OUTPUT"
echo "::notice::Accepting $VERSION on branch $BRANCH"
else
echo "proceed=false" >> "$GITHUB_OUTPUT"
echo "::notice::Skipping: $VERSION does not belong on branch $BRANCH"
fi
generate-trunk:
needs: guard
if: ${{ needs.guard.outputs.proceed == 'true' && inputs.trigger_default_schema }}
uses: ./.github/workflows/base_schema.yml
with:
shopware_version: ${{ inputs.shopware_version }}
php_version: ${{ inputs.php_version }}
secrets: inherit
generate-commercial-trunk:
needs: guard
if: ${{ needs.guard.outputs.proceed == 'true' && inputs.trigger_commercial_schema }}
uses: ./.github/workflows/plugin_commercial_schema.yml
with:
shopware_version: ${{ inputs.shopware_version }}
php_version: ${{ inputs.php_version }}
secrets: inherit
generate-digitalsalesroom-trunk:
needs: guard
if: ${{ needs.guard.outputs.proceed == 'true' && inputs.trigger_digitalsalesroom_schema }}
uses: ./.github/workflows/plugin_digitalsalesroom_schema.yml
with:
shopware_version: ${{ inputs.shopware_version }}
php_version: ${{ inputs.php_version }}
secrets: inherit
generate-customproducts-trunk:
needs: guard
if: ${{ needs.guard.outputs.proceed == 'true' && inputs.trigger_customproducts_schema }}
uses: ./.github/workflows/plugin_customproducts_schema.yml
with:
shopware_version: ${{ inputs.shopware_version }}
php_version: ${{ inputs.php_version }}
secrets: inherit