debug helmchart release #21
Workflow file for this run
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: Create release images and GitHub Release | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| tags: | |
| - v*.*.* | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: clickhouse/clickhouse-operator | |
| IMAGE_TAG_BASE: ghcr.io/clickhouse/clickhouse-operator/clickhouse-operator | |
| VERSION: ${{ github.ref_name }} | |
| # Tempora ry address while repo is private | |
| PAGES_URL: https://solid-adventure-16rp7jv.pages.github.io/ | |
| jobs: | |
| release: | |
| permissions: | |
| packages: write | |
| attestations: write | |
| id-token: write | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: 'go.mod' | |
| #- name: Log in to the Container registry | |
| # uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
| # with: | |
| # registry: ${{ env.REGISTRY }} | |
| # username: ${{ github.actor }} | |
| # password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Helm | |
| run: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
| - name: Verify Helm installation | |
| run: helm version | |
| - name: Set VERSION | |
| run: echo "VERSION=0.0.1" >> $GITHUB_ENV | |
| # - name: Build operator image | |
| # run: make docker-buildx | |
| # - name: Build operator bundle image | |
| # run: make bundle bundle-buildx | |
| #- name: Kustomize Build | |
| # uses: karancode/kustomize-github-action@master | |
| # with: | |
| # token: ${{ github.token }} | |
| # kustomize_version: 5.7.1 | |
| # kustomize_build_dir: "config/default" | |
| # kustomize_output_file: "dist/clickhouse-operator.yaml" | |
| - name: Package helm chart | |
| run: helm package --version ${VERSION} --app-version v${VERSION} dist/chart -d dist/chart | |
| #- name: Create GitHub Release | |
| # uses: softprops/action-gh-release@v1 | |
| # with: | |
| # tag_name: ${{ github.ref_name }} | |
| # name: ${{github.ref_name }} | |
| # body: | | |
| # Pull latest operator images: | |
| # ``` | |
| # docker pull ghcr.io/clickhouse/clickhouse-operator/clickhouse-operator:${{ github.ref_name }} | |
| # docker pull ghcr.io/clickhouse/clickhouse-operator/clickhouse-operator-bundle:${{ github.ref_name }} | |
| # ``` | |
| # To deploy this release use | |
| # ``` | |
| # kubectl apply -f https://github.com/ClickHouse/clickhouse-operator/releases/download/${{github.ref_name}}/clickhouse-operator.yaml | |
| # ``` | |
| # generate_release_notes: true | |
| # append_body: true | |
| # files: | | |
| # dist/clickhouse-operator.yaml | |
| # dist/chart/clickhouse-operator-${VERSION}.tgz | |
| - name: Push chart and updated index | |
| run: | | |
| set -e | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git reset --hard | |
| git fetch origin helm-releases | |
| git checkout helm-releases | |
| find dist/chart | |
| helm repo index --url "${PAGES_URL}/dist/chart" dist/chart | |
| git add dist/chart/index.yaml | |
| git add dist/chart/clickhouse-operator-${VERSION}.tgz | |
| git commit -m "Add chart $GITHUB_REF_NAME" | |
| git push origin helm-releases |