-
Notifications
You must be signed in to change notification settings - Fork 123
Simplify caa multi arch build #2777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
stevenhorsman
wants to merge
6
commits into
confidential-containers:main
Choose a base branch
from
stevenhorsman:simplify-caa-multi-arch-build
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1cd0b67
workflow: caa: Add ppc-runner support
stevenhorsman 56a78ba
workflow: Rename multi-arch CAA build
stevenhorsman 36cedea
caa: Add multi-arch manifest publish script
stevenhorsman da0e964
workflow: Unify the `dev` tag marker
stevenhorsman f37e29e
workflow: Swap multi-arch build logic
stevenhorsman a06934c
caa: Remove old build logic
stevenhorsman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| name: (Callable) Build and push cloud-api-adaptor multi-arch manifest image for all type/arch combinations | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| registry: | ||
| default: 'quay.io/confidential-containers' | ||
| description: 'Image registry (e.g. "quay.io/confidential-containers") where the built image will be pushed to' | ||
| required: false | ||
| type: string | ||
| dev_tags: | ||
| description: 'Comma-separated list of tags for the dev built image (e.g. latest,<sha>-dev)' | ||
| required: true | ||
| type: string | ||
| release_tags: | ||
| description: 'Comma-separated list of tags for the release built image (e.g. <sha>)' | ||
| required: true | ||
| type: string | ||
| git_ref: | ||
| default: 'main' | ||
| description: Git ref to checkout the cloud-api-adaptor repository. Defaults to main. | ||
| required: false | ||
| type: string | ||
| secrets: | ||
| QUAY_PASSWORD: | ||
| required: true | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: src/cloud-api-adaptor | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| build_push_job: | ||
| name: build and push single arch dev and release images | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| types: [ | ||
| { arch: linux/amd64, runner: ubuntu-24.04 }, | ||
| { arch: linux/arm64, runner: ubuntu-24.04-arm }, | ||
| { arch: linux/ppc64le, runner: ubuntu-24.04-ppc64le }, | ||
| { arch: linux/s390x, runner: ubuntu-24.04-s390x }, | ||
| ] | ||
| uses: ./.github/workflows/caa_build_and_push.yaml | ||
| with: | ||
| dev_arches: ${{ matrix.types.arch }} | ||
| dev_tags: ${{ inputs.dev_tags }} | ||
| git_ref: ${{ inputs.git_ref}} | ||
| registry: ${{ inputs.registry }} | ||
| release_arches: ${{ matrix.types.arch }} | ||
| release_tags: ${{ inputs.release_tags }} | ||
| runner: ${{ matrix.types.runner}} | ||
| secrets: | ||
| QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | ||
| permissions: | ||
| packages: write # Needed to push the images to GHCR | ||
|
|
||
| manifest_job: | ||
| name: generate images manifest | ||
| runs-on: ubuntu-24.04 | ||
| needs: [build_push_job] | ||
| steps: | ||
| - name: Checkout the code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: "${{ inputs.git_ref }}" | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0 | ||
|
|
||
| - name: Login to quay Container Registry | ||
| if: ${{ startsWith(inputs.registry, 'quay.io') }} | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 | ||
| with: | ||
| registry: ${{ inputs.registry }} | ||
| username: ${{ vars.QUAY_USERNAME }} | ||
| password: ${{ secrets.QUAY_PASSWORD }} | ||
|
|
||
| - name: Login to Github Container Registry | ||
| if: ${{ startsWith(inputs.registry, 'ghcr.io') }} | ||
| uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 | ||
| with: | ||
| registry: ${{ inputs.registry }} | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Publish multi-arch dev manifest | ||
| run: | | ||
| ./hack/publish.sh publish-multiarch-manifest | ||
| env: | ||
| IMAGE_REGISTRY: ${{ inputs.registry }} | ||
| IMAGE_NAME: "cloud-api-adaptor" | ||
| IMAGE_TAGS: ${{ inputs.dev_tags}} | ||
|
|
||
| - name: Publish multi-arch release manifest | ||
| run: | | ||
| ./hack/publish.sh publish-multiarch-manifest | ||
| env: | ||
| IMAGE_REGISTRY: ${{ inputs.registry }} | ||
| IMAGE_NAME: "cloud-api-adaptor" | ||
| IMAGE_TAGS: ${{ inputs.release_tags}} | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / zizmor
insufficient job-level concurrency limits Warning