File tree Expand file tree Collapse file tree 3 files changed +59
-87
lines changed
Expand file tree Collapse file tree 3 files changed +59
-87
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Release Helm Chart
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v[0-9]+.[0-9]+.[0-9]+'
7+
8+ jobs :
9+ release :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ packages : write
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 0
20+
21+ - name : Set up Helm
22+ uses : azure/setup-helm@v3
23+ with :
24+ version : ' latest'
25+
26+ - name : Configure Docker for OCI
27+ run : |
28+ echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io \
29+ --username ${{ github.actor }} \
30+ --password-stdin
31+
32+ - name : Extract version from tag
33+ id : get_version
34+ run : |
35+ # Remove 'v' prefix from tag
36+ VERSION="${GITHUB_REF#refs/tags/v}"
37+ echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
38+ echo "Tag version: ${VERSION}"
39+
40+ - name : Update Chart.yaml with tag version
41+ run : |
42+ # Update the version in Chart.yaml to match the tag
43+ yq eval ".version = \"${{ steps.get_version.outputs.VERSION }}\"" -i Chart.yaml
44+ echo "Updated Chart.yaml version to ${{ steps.get_version.outputs.VERSION }}"
45+ cat Chart.yaml
46+
47+ - name : Package Helm chart as OCI artifact and push to GitHub Container Registry
48+ run : |
49+ # Package the chart and push to GitHub Container Registry
50+ helm package .
51+
52+ # Get chart name from Chart.yaml
53+ CHART_NAME=$(yq eval '.name' Chart.yaml)
54+ CHART_VERSION=$(yq eval '.version' Chart.yaml)
55+
56+ # Save as OCI artifact
57+ helm push ${CHART_NAME}-${CHART_VERSION}.tgz oci://ghcr.io/${{ github.repository_owner }}
Original file line number Diff line number Diff line change 2424Network Trash Folder
2525Temporary Items
2626.apdisk
27+
28+ * .tgz
You can’t perform that action at this time.
0 commit comments