Skip to content

Commit

Permalink
Update charts-release.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhuizuo authored Oct 2, 2024
1 parent 79220a3 commit 0578206
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/charts-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write
contents: read
packages: write

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -29,7 +31,7 @@ jobs:
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.8.1
version: v3.16.0

- name: Release charts
working-directory: charts
Expand All @@ -38,6 +40,10 @@ jobs:
for chart in cloudevents-server dl tiup-publisher; do
CHART_VERSION=$(grep 'version:' $chart/Chart.yaml | tail -n1 | awk '{ print $2 }')
helm package $chart
helm push $chart-${CHART_VERSION}.tgz oci://ghcr.io/pingcap-qe/ee-apps/charts
if helm show values oci://ghcr.io/pingcap-qe/ee-apps/charts/$chart --version $CHART_VERSION > /dev/null; then
echo "chart '$chart' has no new version, skip publish."
else
helm package $chart
helm push $chart-${CHART_VERSION}.tgz oci://ghcr.io/pingcap-qe/ee-apps/charts
fi
done

0 comments on commit 0578206

Please sign in to comment.