8181 uses : actions/checkout@v4
8282
8383 - name : Build images locally
84- run : make provisioner-localpv-image || exit 1;
84+ run : |
85+ make provisioner-localpv-image || exit 1;
86+ make pvc-manager-image || exit 1;
8587
8688 - name : Setup Minikube-Kubernetes
8789 uses : medyagh/setup-minikube@latest
@@ -194,9 +196,94 @@ jobs:
194196 DBUILD_SITE_URL=https://openebs.io
195197 BRANCH=${{ env.BRANCH }}
196198
199+ pvc-manager :
200+ needs : ['integration-test']
201+ runs-on : ubuntu-latest
202+ steps :
203+ - name : Checkout
204+ uses : actions/checkout@v4
205+
206+ - uses : cachix/install-nix-action@v22
207+ - name : Pre-populate nix-shell
208+ run : |
209+ export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r)
210+ echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV
211+ nix-shell --pure --run "echo" ./shell.nix
212+
213+ - name : Check if the chart is publishable
214+ run : |
215+ nix-shell --pure --run "./scripts/update-chart-version.sh --tag ${TAG} --publish-release" ./shell.nix
216+
217+ - name : Set Image Org
218+ run : |
219+ [ -z "${{ secrets.IMAGE_ORG }}" ] && IMAGE_ORG=openebs || IMAGE_ORG=${{ secrets.IMAGE_ORG}}
220+ echo "IMAGE_ORG=${IMAGE_ORG}" >> $GITHUB_ENV
221+
222+ - name : Set IMAGE_TAG and BRANCH
223+ run : |
224+ BRANCH=${{ github.ref_name }}
225+ echo "BRANCH=$BRANCH" >> $GITHUB_ENV
226+ echo "IMAGE_TAG=$(awk -F': ' '/^version:/ {print $2}' deploy/helm/charts/Chart.yaml)" >> $GITHUB_ENV
227+
228+ - name : Set Build Date
229+ id : date
230+ run : |
231+ echo "DATE=$(date -u +'%Y-%m-%dT%H:%M:%S%Z')" >> $GITHUB_OUTPUT
232+
233+ - name : Docker meta
234+ id : docker_meta
235+ uses : docker/metadata-action@v4
236+ with :
237+ images : |
238+ ghcr.io/${{ env.IMAGE_ORG }}/dev/pvc-manager
239+ tags : |
240+ type=raw,value=latest,enable=false
241+ type=raw,value=${{ env.IMAGE_TAG }}
242+
243+ - name : Print Tag info
244+ run : |
245+ echo "BRANCH: ${{ env.BRANCH }}"
246+ echo "RELEASE_TAG: ${{ steps.docker_meta.outputs.tags }}"
247+
248+ - name : Setup QEMU
249+ uses : docker/setup-qemu-action@v2
250+ with :
251+ platforms : all
252+
253+ - name : Setup Docker Buildx
254+ id : buildx
255+ uses : docker/setup-buildx-action@v2
256+ with :
257+ version : v0.5.1
258+
259+ - name : Login to GHCR
260+ uses : docker/login-action@v2
261+ with :
262+ registry : ghcr.io
263+ username : ${{ github.actor }}
264+ password : ${{ secrets.GITHUB_TOKEN }}
265+
266+ - name : Build pvc-manager binary
267+ run : make pvc-manager
268+
269+ - name : Build and Push Image
270+ uses : docker/build-push-action@v4
271+ with :
272+ context : .
273+ file : ./buildscripts/pvc-manager/Dockerfile
274+ push : true
275+ platforms : linux/amd64, linux/arm64, linux/arm/v7, linux/ppc64le
276+ tags : |
277+ ${{ steps.docker_meta.outputs.tags }}
278+ build-args : |
279+ DBUILD_DATE=${{ steps.date.outputs.DATE }}
280+ DBUILD_REPO_URL=https://github.com/openebs/dynamic-localpv-provisioner
281+ DBUILD_SITE_URL=https://openebs.io
282+ BRANCH=${{ env.BRANCH }}
283+
197284 release-chart :
198285 runs-on : ubuntu-latest
199- needs : ["provisioner-localpv"]
286+ needs : ["provisioner-localpv", "pvc-manager" ]
200287 steps :
201288 - uses : actions/checkout@v4
202289
@@ -220,6 +307,10 @@ jobs:
220307 run : |
221308 nix-shell --pure --run "./scripts/update-reg-repo.sh --registry ghcr.io/ --repository ${{ env.IMAGE_ORG }}/dev/provisioner-localpv" ./shell.nix
222309
310+ - name : Update the registry and repository for pvc-manager in values.yaml
311+ run : |
312+ nix-shell --pure --run "./scripts/update-reg-repo.sh --registry ghcr.io/ --repository ${{ env.IMAGE_ORG }}/dev/pvc-manager --component pvc-manager" ./shell.nix
313+
223314 - name : Set Chart Version
224315 run : |
225316 TAG=$(awk -F': ' '/^version:/ {print $2}' deploy/helm/charts/Chart.yaml)
0 commit comments