Build workflow image #9
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
| # Copyright (c) 2026 The Kata Containers Authors | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # | |
| # Build and push the container image used by the Argo workflow (Helm 4 + kubectl). | |
| # Runs weekly and on manual dispatch. Uses repository owner so forks can test via workflow_dispatch. | |
| # Image: ghcr.io/<owner>/lifecycle-manager-utils:latest | |
| name: Build workflow image | |
| on: | |
| schedule: | |
| # Weekly on Monday 00:00 UTC | |
| - cron: '0 0 * * 1' | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE: lifecycle-manager-utils | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: images/utils | |
| push: true | |
| tags: | | |
| ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE }}:latest | |
| ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE }}:${{ github.sha }} | |
| platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| summary: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: always() && needs.build.result == 'success' | |
| steps: | |
| - run: | | |
| echo "## Workflow image built and pushed" >> $GITHUB_STEP_SUMMARY | |
| echo "" | |
| echo "| Image | Tags |" | |
| echo "|-------|------|" | |
| echo "| \`${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE }}\` | \`latest\`, \`${{ github.sha }}\` |" | |
| echo "" | |
| echo "Use in values: \`images.utils\` (see values.yaml)." |