chore: update chart maintainer (#442) #401
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Charts | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| release-charts-to-acr: | |
| description: Release the Helm charts to ACR | |
| required: false | |
| default: 'false' | |
| jobs: | |
| release: | |
| permissions: | |
| contents: write | |
| packages: write | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository == 'GreptimeTeam/helm-charts' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config user.name "$GITHUB_ACTOR" | |
| git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4.2.0 | |
| - name: Add Dependencies | |
| run: | | |
| helm repo add grafana https://grafana.github.io/helm-charts | |
| helm repo add jaeger-all-in-one https://raw.githubusercontent.com/hansehe/jaeger-all-in-one/master/helm/charts/ | |
| helm repo add greptime https://greptimeteam.github.io/helm-charts/ | |
| - name: Run chart-releaser | |
| uses: helm/chart-releaser-action@v1.7.0 | |
| with: | |
| charts_dir: charts | |
| env: | |
| CR_SKIP_EXISTING: true | |
| CR_GENERATE_RELEASE_NOTES: true | |
| CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Push charts to DockerHub OCI registry | |
| shell: bash | |
| run: | | |
| set -e | |
| echo '${{ secrets.DOCKERHUB_TOKEN }}' | helm registry login registry-1.docker.io -u greptime --password-stdin | |
| shopt -s nullglob | |
| for pkg in .cr-release-packages/*.tgz; do | |
| echo "Pushing chart '$pkg' to oci://registry-1.docker.io/greptime" | |
| helm push "$pkg" "oci://registry-1.docker.io/greptime" | |
| done | |
| release-charts-to-acr: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository == 'GreptimeTeam/helm-charts' && (inputs.release-charts-to-acr == 'true' || github.event_name == 'push') }} | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4.2.0 | |
| - name: Login to OCI registry | |
| run: echo '${{ secrets.ALICLOUD_PASSWORD }}' | helm registry login ${{ vars.OCI_REGISTRY_URL }} -u ${{ secrets.ALICLOUD_USERNAME }} --password-stdin | |
| - name: Package and push Helm Charts | |
| shell: bash | |
| env: | |
| OCI_REGISTRY_URL: ${{ vars.OCI_REGISTRY_URL }} | |
| OCI_NAMESPACE: ${{ vars.OCI_NAMESPACE }} | |
| run: | | |
| ./scripts/release/release-charts-to-acr.sh | |
| release-charts-to-s3: | |
| needs: [ | |
| release, | |
| ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| # TODO(zyy17): Maybe it's not a elegant way to wait for GitHub Pages to update. For many scenarios, waiting for 5 minutes is enough. | |
| - name: Wait for deployment of GitHub Pages | |
| run: | | |
| sleep 300 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install s5cmd | |
| shell: bash | |
| run: | | |
| wget https://github.com/peak/s5cmd/releases/download/v2.3.0/s5cmd_2.3.0_Linux-64bit.tar.gz | |
| tar -xzf s5cmd_2.3.0_Linux-64bit.tar.gz | |
| sudo mv s5cmd /usr/local/bin/ | |
| sudo chmod +x /usr/local/bin/s5cmd | |
| - name: Release charts to S3 | |
| shell: bash | |
| run: | | |
| ./scripts/release/release-charts-to-s3.sh ${{ vars.AWS_RELEASE_BUCKET }} | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_CN_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_CN_SECRET_ACCESS_KEY }} | |
| AWS_REGION: ${{ vars.AWS_RELEASE_BUCKET_REGION }} |