-
Notifications
You must be signed in to change notification settings - Fork 97
146 lines (135 loc) · 4.36 KB
/
Copy pathrelease-for-ec.yaml
File metadata and controls
146 lines (135 loc) · 4.36 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: release-for-ec
on:
workflow_dispatch:
inputs:
tag:
description: "Tag to use for building images and tagging Helm chart (must end with -ec.<digit>, e.g. v1.128.2-ec.1)"
required: true
type: string
permissions:
contents: write
jobs:
validate-tag:
runs-on: ubuntu-latest
steps:
- name: Validate tag format
run: |
if ! [[ "${{ inputs.tag }}" =~ ^v ]]; then
echo "Error: Tag must start with 'v' (e.g. v1.128.2-ec.1)"
exit 1
fi
if ! [[ "${{ inputs.tag }}" =~ -ec\.[0-9]+$ ]]; then
echo "Error: Tag must end with -ec.<digit> suffix (e.g. v1.128.2-ec.1)"
exit 1
fi
echo "Tag format is valid: ${{ inputs.tag }}"
build-migrations-melange-packages:
needs: [validate-tag]
strategy:
fail-fast: true
matrix:
runner:
[
{ name: ubuntu-latest, arch: amd64 },
{ name: arm64-runner-set, arch: arm64 },
]
runs-on: ${{ matrix.runner.name }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-custom-melange-package
with:
context: migrations/deploy
component: kotsadm-migrations
git-tag: ${{ inputs.tag }}
arch: ${{ matrix.runner.arch }}
build-migrations:
runs-on: ubuntu-latest
needs: [build-migrations-melange-packages]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-custom-image-with-apko
with:
context: migrations/deploy
component: kotsadm-migrations
git-tag: ${{ inputs.tag }}
image-name: index.docker.io/kotsadm/kotsadm-migrations:${{ inputs.tag }}
registry-username: ${{ secrets.DOCKERHUB_USER }}
registry-password: ${{ secrets.DOCKERHUB_PASSWORD }}
build-kurl-proxy-melange-packages:
needs: [validate-tag]
strategy:
fail-fast: true
matrix:
runner:
[
{ name: ubuntu-latest, arch: amd64 },
{ name: arm64-runner-set, arch: arm64 },
]
runs-on: ${{ matrix.runner.name }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-custom-melange-package
with:
context: kurl_proxy/deploy
component: kurl-proxy
git-tag: ${{ inputs.tag }}
arch: ${{ matrix.runner.arch }}
build-kurl-proxy:
runs-on: ubuntu-latest
needs: [build-kurl-proxy-melange-packages]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-custom-image-with-apko
with:
context: kurl_proxy/deploy
component: kurl-proxy
git-tag: ${{ inputs.tag }}
image-name: index.docker.io/kotsadm/kurl-proxy:${{ inputs.tag }}
registry-username: ${{ secrets.DOCKERHUB_USER }}
registry-password: ${{ secrets.DOCKERHUB_PASSWORD }}
build-kotsadm-melange-packages:
needs: [validate-tag]
strategy:
fail-fast: true
matrix:
runner:
[
{ name: ubuntu-latest, arch: amd64 },
{ name: arm64-runner-set, arch: arm64 },
]
runs-on: ${{ matrix.runner.name }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-custom-melange-package
with:
context: deploy
component: kotsadm
git-tag: ${{ inputs.tag }}
arch: ${{ matrix.runner.arch }}
build-kotsadm:
runs-on: ubuntu-latest
needs: [build-kotsadm-melange-packages]
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/build-custom-image-with-apko
with:
context: deploy
component: kotsadm
git-tag: ${{ inputs.tag }}
image-name: index.docker.io/kotsadm/kotsadm:${{ inputs.tag }}
registry-username: ${{ secrets.DOCKERHUB_USER }}
registry-password: ${{ secrets.DOCKERHUB_PASSWORD }}
tag-helm-chart:
runs-on: ubuntu-latest
needs: [build-migrations, build-kurl-proxy, build-kotsadm]
steps:
- name: Checkout Chart
uses: actions/checkout@v6
with:
repository: replicatedhq/kots-helm
token: ${{ secrets.GH_PAT }}
ref: main
- name: Tag Chart
run: |
git tag "${{ inputs.tag }}+${GITHUB_SHA:0:7}"
git push origin "${{ inputs.tag }}+${GITHUB_SHA:0:7}"