Merge pull request #362 from cwiklik/fix/audience-mapper-empty-id #92
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: release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| packages: write | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| REGISTRY: ghcr.io | |
| REPO: kagenti/kagenti-operator | |
| CHARTS_PATH: ./charts | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log in to ghcr.io | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # --- kagenti-operator image --- | |
| - name: Extract Docker metadata (kagenti-operator) | |
| id: operator-meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ github.repository }}/kagenti-operator | |
| tags: | | |
| type=sha,prefix={{branch}}-,enable={{is_default_branch}} | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=semver,pattern={{version}} | |
| - name: Build and push kagenti-operator | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: ./kagenti-operator | |
| file: ./kagenti-operator/Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.operator-meta.outputs.tags }} | |
| labels: ${{ steps.operator-meta.outputs.labels }} | |
| # --- agentcard-signer image --- | |
| - name: Extract Docker metadata (agentcard-signer) | |
| id: signer-meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ github.repository }}/agentcard-signer | |
| tags: | | |
| type=sha,prefix={{branch}}-,enable={{is_default_branch}} | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=semver,pattern={{version}} | |
| - name: Build and push agentcard-signer | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: ./kagenti-operator | |
| file: ./kagenti-operator/cmd/agentcard-signer/Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.signer-meta.outputs.tags }} | |
| labels: ${{ steps.signer-meta.outputs.labels }} | |
| # --- Release-only steps (tag pushes) --- | |
| - name: Set up Helm | |
| if: github.ref_type == 'tag' | |
| uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5.0.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install yq | |
| if: github.ref_type == 'tag' | |
| uses: mikefarah/yq@v4 | |
| - name: Package and push Helm chart | |
| if: github.ref_type == 'tag' | |
| run: | | |
| chartVersion=$(echo "${{ github.ref_name }}" | cut -c 2-) | |
| chartPackageName="kagenti-operator-chart-${chartVersion}.tgz" | |
| cd ${{ env.CHARTS_PATH }}/kagenti-operator | |
| yq -i '.controllerManager.container.image.tag = strenv(chartVersion)' values.yaml | |
| yq -i '.controllerManager.container.image.pullPolicy = "IfNotPresent"' values.yaml | |
| helm package . --destination . --version "${chartVersion}" --app-version "${chartVersion}" | |
| helm push "./${chartPackageName}" oci://${{ env.REGISTRY }}/${{ env.REPO }} | |
| - name: Create GitHub Release | |
| if: github.ref_type == 'tag' | |
| run: gh release create "${{ github.ref_name }}" --generate-notes | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| e2e-helm-install: | |
| needs: build-and-push | |
| if: github.ref_type != 'tag' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Create Kind cluster | |
| uses: helm/kind-action@v1 | |
| - name: Install cert-manager | |
| run: | | |
| kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.17.2/cert-manager.yaml | |
| kubectl -n cert-manager rollout status deployment/cert-manager --timeout=90s | |
| kubectl -n cert-manager rollout status deployment/cert-manager-webhook --timeout=90s | |
| kubectl -n cert-manager rollout status deployment/cert-manager-cainjector --timeout=90s | |
| - name: Install Helm chart | |
| run: | | |
| helm install kagenti-operator ./charts/kagenti-operator | |
| - name: Wait for deployment rollout | |
| run: | | |
| kubectl rollout status deployment/kagenti-controller-manager \ | |
| --timeout=120s | |
| - name: Verify operator pod is Running and Ready | |
| run: | | |
| kubectl wait pods \ | |
| -l control-plane=controller-manager \ | |
| --for=condition=Ready \ | |
| --timeout=60s | |
| kubectl get pods -l control-plane=controller-manager |