cri-o for k8s autobuild #416
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: cri-o for k8s autobuild | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| sealosPatch: | |
| description: 'sealos patch image for development.eg.ghcr.io/labring/sealos-patch:latest' | |
| required: false | |
| part: | |
| description: 'exec part.1,2,3,4,5' | |
| required: true | |
| default: 0 | |
| allbuild: | |
| description: 'build all images' | |
| required: true | |
| default: false | |
| env: | |
| part: ${{ github.event.inputs.part }} | |
| allBuild: ${{ github.event.inputs.allbuild }} | |
| registry: ghcr.io | |
| repo: ${{ github.repository }} | |
| sealosPatch: ${{ github.event.inputs.sealosPatch }} | |
| criType: cri-o | |
| jobs: | |
| resolve-issue-sealoslatest: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| sealoslatest: ${{ steps.set-sealoslatest.outputs.sealoslatest }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set sealos LatestVersion | |
| id: set-sealoslatest | |
| run: | | |
| export commentbody="${{github.event.comment.body}}" | |
| .github/scripts/versions/versions_sealos.sh | |
| resolve-versions-arch: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - resolve-issue-sealoslatest | |
| env: | |
| sealoslatest: ${{ needs.resolve-issue-sealoslatest.outputs.sealoslatest }} | |
| outputs: | |
| matrix: ${{ steps.set-versions.outputs.matrix }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Resolve Versions | |
| id: set-versions | |
| run: .github/scripts/versions/versions_arch.sh | |
| resolve-versions: | |
| runs-on: ubuntu-24.04 | |
| needs: | |
| - resolve-issue-sealoslatest | |
| env: | |
| sealoslatest: ${{ needs.resolve-issue-sealoslatest.outputs.sealoslatest }} | |
| outputs: | |
| matrix: ${{ steps.set-versions.outputs.matrix }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Resolve Versions | |
| id: set-versions | |
| run: .github/scripts/versions/versions.sh | |
| build-images: | |
| name: building | |
| needs: | |
| - resolve-issue-sealoslatest | |
| - resolve-versions-arch | |
| runs-on: ubuntu-24.04 | |
| env: | |
| sealoslatest: ${{ needs.resolve-issue-sealoslatest.outputs.sealoslatest }} | |
| strategy: | |
| matrix: ${{ fromJson(needs.resolve-versions-arch.outputs.matrix) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Download tools and sealos | |
| run: .github/scripts/download.sh | |
| - name: Auto build image | |
| env: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| arch: ${{ matrix.arch }} | |
| kubeVersion: ${{ matrix.version }} | |
| run: .github/scripts/kubernetes.sh | |
| build_manifest: | |
| needs: | |
| - resolve-issue-sealoslatest | |
| - resolve-versions | |
| - build-images | |
| name: manifest | |
| env: | |
| sealoslatest: ${{ needs.resolve-issue-sealoslatest.outputs.sealoslatest }} | |
| strategy: | |
| matrix: ${{ fromJson(needs.resolve-versions.outputs.matrix) }} | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Download tools and sealos | |
| run: .github/scripts/download.sh | |
| - name: Manifest Image | |
| env: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| version: ${{ matrix.version }}-${{ env.sealoslatest }} | |
| run: .github/scripts/manifest.sh ${{ secrets.D_REGISTRY_TOKEN }} |