Skip to content

Commit 791bf24

Browse files
ci: sync the helm chart from the UI repo before building and releasing (#70)
Signed-off-by: Harikrishnan Balagopal <[email protected]>
1 parent e5e3bc4 commit 791bf24

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

.github/workflows/build.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,20 @@ jobs:
1212
name: Image build
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
# copy the helm chart from the UI repo
16+
- name: checkout-the-ui-repo
17+
uses: actions/checkout@v2
18+
with:
19+
repository: 'konveyor/move2kube-ui'
20+
- name: copy-helm-chart-into-tmp
21+
run: cp -r helm-charts/ /tmp/helm-charts-move2kube
22+
- name: cleanup
23+
run: rm -rf {*,.*} || true
24+
- name: checkout-the-current-repo
25+
uses: actions/checkout@v2
26+
- name: copy-helm-chart-into-pwd
27+
run: rm -rf helm-charts/ && cp -r /tmp/helm-charts-move2kube helm-charts
28+
# build the operator container image
1629
- id: image_tag
1730
run: |
1831
BRANCH="${GITHUB_REF#refs/heads/}"

.github/workflows/release.yml

+17-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
required: true
1313
default: v0.1.0-beta.0
1414
commit_ref:
15-
description: "commit ref: The branch, tag or SHA of the commit to use for the release."
15+
description: "commit ref: The branch or tag of the commit to use for the release. The same tag needs to exist in the UI repo for copying the Helm chart."
1616
required: false
1717
default: main
1818

@@ -101,18 +101,32 @@ jobs:
101101
name: Image build
102102
runs-on: ubuntu-latest
103103
steps:
104-
- uses: actions/checkout@v2
104+
# copy the helm chart from the UI repo
105+
- name: checkout-the-ui-repo
106+
uses: actions/checkout@v2
107+
with:
108+
repository: 'konveyor/move2kube-ui'
109+
ref: ${{ github.event.inputs.commit_ref }}
110+
- name: copy-helm-chart-into-tmp
111+
run: cp -r helm-charts/ /tmp/helm-charts-move2kube
112+
- name: cleanup
113+
run: rm -rf {*,.*} || true
114+
- name: checkout-the-current-repo
115+
uses: actions/checkout@v2
105116
with:
106117
ref: ${{ github.event.inputs.commit_ref }}
118+
- name: copy-helm-chart-into-pwd
119+
run: rm -rf helm-charts/ && cp -r /tmp/helm-charts-move2kube helm-charts
120+
# build the bundle and container images
107121
- name: install-yq
108122
run: |
109123
echo "installing yq..."
110124
curl -L https://github.com/mikefarah/yq/releases/download/v4.13.5/yq_linux_amd64 -o /usr/local/bin/yq && chmod +x /usr/local/bin/yq
111125
echo "yq installed"
112126
- name: build
113127
run: |
114-
VERSION=${{ github.event.inputs.tag }} make docker-build
115128
rm -rf bundle/
129+
VERSION=${{ github.event.inputs.tag }} make docker-build
116130
VERSION=${{ github.event.inputs.tag }} make bundle
117131
VERSION=${{ github.event.inputs.tag }} make bundle-build
118132
- run: echo "${{ secrets.QUAY_BOT_PASSWORD }}" | docker login --username "${{ secrets.QUAY_BOT_USERNAME }}" --password-stdin quay.io

0 commit comments

Comments
 (0)