File tree Expand file tree Collapse file tree 2 files changed +33
-18
lines changed
template/{% if git_platform=="github.com" %}.github{% endif %}/workflows Expand file tree Collapse file tree 2 files changed +33
-18
lines changed Original file line number Diff line number Diff line change 5858 push : true
5959 tags : ${{ steps.meta.outputs.tags }}
6060 labels : ${{ steps.meta.outputs.labels }}
61-
62- {% if helm %}
63- - name : Install Helm
64- uses : Azure/setup-helm@v4
65- id : install
66-
67- - name : Log in to GitHub Container Registry
68- if : github.ref_type == 'tag'
69- run : |
70- echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io/${{ github.repository }} --username ${{ github.repository_owner }} --password-stdin
71-
72- - name : package chart and push it
73- if : github.ref_type == 'tag'
74- run : |
75- helm dependencies update helm/{{ repo_name }}
76- helm package helm/{{ repo_name }} --version ${{ steps.meta.outputs.version }} --app-version ${{ steps.meta.outputs.version }} -d /tmp/
77- helm push /tmp/{{ repo_name }}-${{ steps.meta.outputs.version }}.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
78- {% end if %}
Original file line number Diff line number Diff line change 1+ on:
2+ workflow_call:
3+
4+ jobs:
5+ build:
6+ runs-on: ubuntu-latest
7+
8+ steps:
9+ - name: Create tags for publishing image
10+ id: meta
11+ uses: docker/metadata-action@v5
12+ with:
13+ images: ghcr.io/${{ github.repository }}
14+ tags: |
15+ type=semver,pattern={{version}}
16+ type=ref,event=tag
17+ type=raw,value=latest
18+
19+ - name: Install Helm
20+ uses: Azure/setup-helm@v4
21+ id: install
22+
23+ - name: Log in to GitHub Container Registry
24+ if: github.ref_type == 'tag'
25+ run: |
26+ echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io/${{ github.repository }} --username ${{ github.repository_owner }} --password-stdin
27+
28+ - name: package chart and push it
29+ if: github.ref_type == 'tag'
30+ run: |
31+ helm dependencies update helm/{{ repo_name }}
32+ helm package helm/{{ repo_name }} {% raw %}--version ${{ steps.meta.outputs.version }} --app-version ${{ steps.meta.outputs.version }}{% endraw %} -d /tmp/
33+ helm push /tmp/{{ repo_name }}-{% raw %}${{ steps.meta.outputs.version }}.tgz oci://ghcr.io/${{ github.repository_owner }}{% endraw %}/charts
You can’t perform that action at this time.
0 commit comments