1717 permissions :
1818 contents : write
1919 packages : write
20-
20+
2121 steps :
2222 - name : Checkout repository
2323 uses : actions/checkout@v4
2727 with :
2828 version : v3.14.0
2929
30+ - name : Set lowercased owner
31+ shell : bash
32+ run : echo "OWNER_LC=${GITHUB_REPOSITORY_OWNER@L}" >> "$GITHUB_ENV"
33+
3034 - name : Determine version
3135 id : version
3236 run : |
@@ -46,25 +50,25 @@ jobs:
4650 run : |
4751 VERSION=${{ steps.version.outputs.version }}
4852 echo "Updating charts to version: $VERSION"
49-
53+
5054 # Update helm-standalone chart
5155 sed -i "s/version: .*/version: $VERSION/" deployments/helm-standalone/Chart.yaml
5256 sed -i "s/appVersion: .*/appVersion: \"$VERSION\"/" deployments/helm-standalone/Chart.yaml
53-
54- # Update helm-for-kof chart
57+
58+ # Update helm-for-kof chart
5559 sed -i "s/version: .*/version: $VERSION/" deployments/helm-for-kof/Chart.yaml
5660 sed -i "s/appVersion: .*/appVersion: \"$VERSION\"/" deployments/helm-for-kof/Chart.yaml
5761
5862 - name : Package Helm Charts
5963 run : |
6064 mkdir -p charts
61-
65+
6266 # Package helm-standalone
6367 helm package deployments/helm-standalone -d charts
64-
68+
6569 # Package helm-for-kof
6670 helm package deployments/helm-for-kof -d charts
67-
71+
6872 ls -la charts/
6973
7074 - name : Login to GitHub Container Registry
@@ -77,21 +81,21 @@ jobs:
7781 - name : Push Charts to GHCR
7882 run : |
7983 VERSION=${{ steps.version.outputs.version }}
80-
84+
8185 # Push helm-standalone chart
82- helm push charts/finops-agent-$VERSION.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
83-
86+ helm push charts/finops-agent-$VERSION.tgz oci://ghcr.io/${{ env.OWNER_LC }}/charts
87+
8488 # Push helm-for-kof chart
85- helm push charts/finops-agent-kof-$VERSION.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
89+ helm push charts/finops-agent-kof-$VERSION.tgz oci://ghcr.io/${{ env.OWNER_LC }}/charts
8690
8791 - name : Install ORAS
8892 uses : oras-project/setup-oras@v1
8993
9094 - name : Tag charts as latest
9195 if : github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
9296 run : |
93- oras tag ghcr.io/${{ github.repository_owner }}/charts/finops-agent:${{ steps.version.outputs.version }} latest
94- oras tag ghcr.io/${{ github.repository_owner }}/charts/finops-agent-kof:${{ steps.version.outputs.version }} latest
97+ oras tag ghcr.io/${{ env.OWNER_LC }}/charts/finops-agent:${{ steps.version.outputs.version }} latest
98+ oras tag ghcr.io/${{ env.OWNER_LC }}/charts/finops-agent-kof:${{ steps.version.outputs.version }} latest
9599
96100 - name : Create GitHub Release
97101 if : startsWith(github.ref, 'refs/tags/')
0 commit comments