@@ -26,15 +26,14 @@ concurrency:
2626env :
2727 helm_chart : " reflector"
2828 helm_chart_dir : " src/helm/reflector"
29+ helm_chart_repository : " oci://ghcr.io/emberstack/helm-charts"
2930
30-
31- containerImage : " kubernetes-reflector"
32- containerImageBuildContext : " src/"
33- containerImageBuildDockerfile : " src/ES.Kubernetes.Reflector/Dockerfile"
34- dockerHubContainerImageRepository : " emberstack"
35- ghcrContainerImageRepository : " ghcr.io/emberstack/container-images"
36- helmChart : " reflector"
37- helmChartDir : " src/helm/reflector"
31+ container_image : " kubernetes-reflector"
32+ container_image_build_context : " src/"
33+ container_image_build_platforms : " linux/amd64,linux/arm/v7,linux/arm64"
34+ container_image_build_dockerfile : " src/ES.Kubernetes.Reflector/Dockerfile"
35+ container_image_repository_dockerhub : " emberstack"
36+ container_image_repository_ghcr : " ghcr.io/emberstack"
3837
3938jobs :
4039 discovery :
@@ -227,40 +226,39 @@ jobs:
227226 with :
228227 driver : docker-container # REQUIRED for multi-platform builds
229228
230-
231-
232229 - name : helm - import README
233230 run : cp README.md ${{ env.helm_chart_dir }}/README.md
234231
235232 - name : helm - package chart
236- run : helm package --destination .artifacts/helm --version build- ${{ env.gitVersion_SemVer }} --app-version build- ${{ env.gitVersion_SemVer }} ${{ env.helm_chart_dir }}
233+ run : helm package --destination .artifacts/helm --version ${{ env.gitVersion_SemVer }} --app-version ${{ env.gitVersion_SemVer }} ${{ env.helm_chart_dir }}
237234
238235 - name : helm - template chart
239- run : helm template --namespace kube-system ${{ env.helm_chart }} .artifacts/helm/${{ env.helm_chart }}-build- ${{ env.gitVersion_SemVer }}.tgz > .artifacts/kubectl/${{ env.helmChart }}.yaml
236+ run : helm template --namespace kube-system ${{ env.helm_chart }} .artifacts/helm/${{ env.helm_chart }}-${{ env.gitVersion_SemVer }}.tgz > .artifacts/kubectl/${{ env.helm_chart }}.yaml
240237
241- # - name: helm - artifacthub - repo
242- # run: install -D src/helm/artifacthub-repo.yaml .artifacts/artifacthub/artifacthub-repo.yaml
238+ - name : helm - artifacthub - repo
239+ run : install -D src/helm/artifacthub-repo.yaml .artifacts/artifacthub/artifacthub-repo.yaml
243240
244- # - name: docker - build and push
245- # uses: docker/build-push-action@v6
246- # with:
247- # context: ${{ env.containerImageBuildContext }}
248- # file: ${{ env.containerImageBuildDockerfile }}
249- # push: ${{ needs.discovery.outputs.requiresBuildPush == 'true' }}
250- # provenance: false
251- # platforms: linux/amd64,linux/arm/v7,linux/arm64
252- # labels: |
253- # org.opencontainers.image.source=https://github.com/${{ github.repository }}
254- # org.opencontainers.image.url=https://github.com/${{ github.repository }}
255- # org.opencontainers.image.vendor=${{ github.repository_owner }}
256- # org.opencontainers.image.version=${{ env.gitVersion_SemVer }}
257- # org.opencontainers.image.revision=${{ github.sha }}
258- # tags: |
259- # ${{ env.dockerHubContainerImageRepository }}/${{ env.containerImage }}:build-${{ env.gitVersion_SemVer }}
260- # ${{ env.ghcrContainerImageRepository }}/${{ env.containerImage }}:build-${{ env.gitVersion_SemVer }}
261-
262- # - name: helm - push - ghcr.io
263- # run: helm push .artifacts/helm/${{ env.helmChart }}-${{ env.gitVersion_SemVer }}.tgz oci://ghcr.io/${{ github.repository_owner }}/helm-charts
241+ - name : docker - build and push
242+ uses : docker/build-push-action@v6
243+ with :
244+ context : ${{ env.container_image_build_context }}
245+ file : ${{ env.container_image_build_dockerfile }}
246+ push : ${{ env.build_push == 'true' }}
247+ provenance : false
248+ platforms : ${{ env.container_image_build_platforms }}
249+ labels : |
250+ org.opencontainers.image.source=https://github.com/${{ github.repository }}
251+ org.opencontainers.image.url=https://github.com/${{ github.repository }}
252+ org.opencontainers.image.vendor=${{ github.repository_owner }}
253+ org.opencontainers.image.version=${{ env.gitVersion_SemVer }}
254+ org.opencontainers.image.revision=${{ github.sha }}
255+ tags : |
256+ ${{ env.container_image_repository_dockerhub }}/${{ env.container_image }}:${{ env.gitVersion_SemVer }}
257+ ${{ env.container_image_repository_ghcr }}/${{ env.container_image }}:${{ env.gitVersion_SemVer }}
258+
259+ - name : helm - push
260+ if : ${{ env.build_push == 'true' }}
261+ run : helm push .artifacts/helm/${{ env.helm_chart }}-${{ env.gitVersion_SemVer }}.tgz ${{ env.helm_chart_repository }}
264262
265263 # - name: oras - push - artifact hub metadata
266264 # if: ${{ needs.discovery.outputs.requiresRelease == 'true' }}
0 commit comments