Skip to content

Commit ba0e984

Browse files
committed
feat(ci): enhance Helm integration in pipeline
- Installs Helm and logs into GitHub Container Registry. - Reintroduces the push step for Helm artifact hub metadata using ORAS. - Adds a new step for pushing Helm charts to the repository.
1 parent d7bd1c9 commit ba0e984

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

.github/workflows/pipeline.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -279,20 +279,19 @@ jobs:
279279
name: artifacts-kubectl-${{env.gitVersion_SemVer}}
280280
path: .artifacts/kubectl
281281

282+
- name: tools - helm - install
283+
uses: azure/setup-helm@v4
284+
285+
- name: tools - helm - login - ghcr.io
286+
if: ${{ env.build_push == 'true' }}
287+
run: echo "${{ secrets.ES_GITHUB_PAT }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
288+
282289
- name: tools - oras - install
283290
uses: oras-project/setup-oras@v1
284291

285292
- name: tools - oras - login - ghcr.io
286293
run: echo "${{ secrets.ES_GITHUB_PAT }}" | oras login ghcr.io -u ${{ github.actor }} --password-stdin
287294

288-
289-
- name: oras - push - helm - artifact hub metadata
290-
if: ${{ env.helm_chart_repository_protocol == 'oci://' }}
291-
run: |
292-
oras push ${{ env.helm_chart_repository }}/${{ env.helm_chart }}:artifacthub.io \
293-
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
294-
.artifacts/helm/artifacthub-repo.yaml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
295-
296295
- name: tools - docker - login ghcr.io
297296
uses: docker/login-action@v3
298297
with:
@@ -319,6 +318,17 @@ jobs:
319318
--tag ${{ env.container_image_repository_ghcr }}/${{ env.container_image }}:${{ env.gitVersion_SemVer }} \
320319
${{ env.container_image_repository_ghcr }}/${{ env.container_image }}:${{ env.gitVersion_SemVer }}
321320
321+
- name: oras - push - helm - artifact hub metadata
322+
if: ${{ env.helm_chart_repository_protocol == 'oci://' }}
323+
run: |
324+
oras push ${{ env.helm_chart_repository }}/${{ env.helm_chart }}:artifacthub.io \
325+
--config /dev/null:application/vnd.cncf.artifacthub.config.v1+yaml \
326+
.artifacts/helm/artifacthub-repo.yaml:application/vnd.cncf.artifacthub.repository-metadata.layer.v1.yaml
327+
328+
- name: helm - push
329+
run: helm push .artifacts/helm/${{ env.helm_chart }}-${{ env.gitVersion_SemVer }}.tgz ${{ env.helm_chart_repository_protocol }}${{ env.helm_chart_repository }}
330+
331+
322332
- name: github - release - create
323333
uses: softprops/action-gh-release@v2
324334
with:

0 commit comments

Comments
 (0)