refactor(helm): resolve config in constructor following Kiali pattern… #737
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 as container image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| env: | |
| QUAY_IMAGE_NAME: quay.io/containers/kubernetes_mcp_server | |
| GHCR_IMAGE_NAME: ghcr.io/containers/kubernetes-mcp-server | |
| TAG: ${{ github.ref_name == 'main' && 'latest' || github.ref_type == 'tag' && github.ref_name && startsWith(github.ref_name, 'v') && github.ref_name || 'unknown' }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| publish-platform-images: | |
| name: 'Publish: linux-${{ matrix.platform.tag }}' | |
| if: github.repository == 'containers/kubernetes-mcp-server' | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| platform: | |
| - runner: ubuntu-latest | |
| tag: amd64 | |
| - runner: ubuntu-24.04-arm | |
| tag: arm64 | |
| runs-on: ${{ matrix.platform.runner }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Podman # Not available in arm64 image | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y podman | |
| - name: Quay Login | |
| run: | | |
| echo ${{ secrets.QUAY_PASSWORD }} | podman login quay.io -u ${{ secrets.QUAY_USERNAME }} --password-stdin | |
| - name: GHCR Login | |
| run: | | |
| echo ${{ secrets.GITHUB_TOKEN }} | podman login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Build Image | |
| run: | | |
| podman build \ | |
| --platform "linux/${{ matrix.platform.tag }}" \ | |
| -f Dockerfile \ | |
| -t "${{ env.QUAY_IMAGE_NAME }}:${{ env.TAG }}-linux-${{ matrix.platform.tag }}" \ | |
| -t "${{ env.GHCR_IMAGE_NAME }}:${{ env.TAG }}-linux-${{ matrix.platform.tag }}" \ | |
| . | |
| - name: Push Image to Quay | |
| run: | | |
| podman push \ | |
| "${{ env.QUAY_IMAGE_NAME }}:${{ env.TAG }}-linux-${{ matrix.platform.tag }}" | |
| - name: Push Image to GHCR | |
| run: | | |
| podman push \ | |
| "${{ env.GHCR_IMAGE_NAME }}:${{ env.TAG }}-linux-${{ matrix.platform.tag }}" | |
| publish-manifest: | |
| name: Publish Manifest | |
| if: github.repository == 'containers/kubernetes-mcp-server' | |
| runs-on: ubuntu-latest | |
| needs: publish-platform-images | |
| steps: | |
| - name: Quay Login | |
| run: | | |
| echo ${{ secrets.QUAY_PASSWORD }} | podman login quay.io -u ${{ secrets.QUAY_USERNAME }} --password-stdin | |
| - name: GHCR Login | |
| run: | | |
| echo ${{ secrets.GITHUB_TOKEN }} | podman login ghcr.io -u ${{ github.actor }} --password-stdin | |
| - name: Create and Push Quay Manifest | |
| run: | | |
| podman manifest create \ | |
| "${{ env.QUAY_IMAGE_NAME }}:${{ env.TAG }}" \ | |
| "${{ env.QUAY_IMAGE_NAME }}:${{ env.TAG }}-linux-amd64" \ | |
| "${{ env.QUAY_IMAGE_NAME }}:${{ env.TAG }}-linux-arm64" | |
| podman manifest push \ | |
| "${{ env.QUAY_IMAGE_NAME }}:${{ env.TAG }}" | |
| - name: Create and Push GHCR Manifest | |
| run: | | |
| podman manifest create \ | |
| "${{ env.GHCR_IMAGE_NAME }}:${{ env.TAG }}" \ | |
| "${{ env.GHCR_IMAGE_NAME }}:${{ env.TAG }}-linux-amd64" \ | |
| "${{ env.GHCR_IMAGE_NAME }}:${{ env.TAG }}-linux-arm64" | |
| podman manifest push \ | |
| "${{ env.GHCR_IMAGE_NAME }}:${{ env.TAG }}" |