-
Notifications
You must be signed in to change notification settings - Fork 68
Add ppc64le support for base image #243
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
base: main
Are you sure you want to change the base?
Changes from all commits
a0872bb
07c6888
ff3dbf4
aad96eb
ad28338
c2ec1c2
04e1d01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -1,11 +1,9 @@ | ||||
|
|
||||
| name: Build of UBI 9 based Developer Images | ||||
|
|
||||
| on: | ||||
| push: | ||||
| branches: [ main ] | ||||
| workflow_dispatch: | ||||
|
|
||||
| workflow_call: | ||||
| # Map the workflow outputs to job outputs | ||||
| secrets: | ||||
|
|
@@ -15,8 +13,8 @@ on: | |||
| required: true | ||||
| outputs: | ||||
| uniq_tag: | ||||
| description: "The first output string" | ||||
| value: ${{ jobs.build_universal_ubi9_image.outputs.output1 }} | ||||
| description: "The unique tag for universal developer image" | ||||
| value: ${{ jobs.publish-udi.outputs.uniq_tag }} | ||||
|
|
||||
| env: | ||||
| # Use repository variable if set, otherwise fallback to default registry | ||||
|
|
@@ -28,24 +26,37 @@ jobs: | |||
| strategy: | ||||
| fail-fast: false | ||||
| matrix: | ||||
| runners: ['ubuntu-22.04', 'ubuntu-22.04-arm'] | ||||
| runs-on: ${{matrix.runners}} | ||||
| include: | ||||
| - name: amd64-build | ||||
| runner: ubuntu-22.04 | ||||
| arch: amd64 | ||||
| - name: arm64-build | ||||
| runner: ubuntu-22.04-arm | ||||
| arch: arm64 | ||||
| - name: ppc64le-build | ||||
| runner: ubuntu-22.04 | ||||
| arch: ppc64le | ||||
| runs-on: ${{ matrix.runner }} | ||||
| steps: | ||||
| - name: Checkout | ||||
| uses: actions/checkout@v4 | ||||
| - name: Set arch environment variable | ||||
| run: | | ||||
| if [[ ${{matrix.runners}} == 'ubuntu-22.04' ]]; then | ||||
| echo arch="amd64" >> $GITHUB_ENV | ||||
| else | ||||
| echo arch="arm64" >> $GITHUB_ENV | ||||
| fi | ||||
| run: echo "arch=${{ matrix.arch }}" >> $GITHUB_ENV | ||||
| - name: Set short_sha environment variable | ||||
| run: echo short_sha="$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV | ||||
| - name: Free runner space | ||||
| run: sudo rm -rf /usr/local/lib/android | ||||
| - name: Cleanup docker images | ||||
| run: docker system prune -af | ||||
| # Setup QEMU for cross-platform builds | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think these comments don't add much value. I suggest removing them
Suggested change
|
||||
| - name: Set up QEMU | ||||
| uses: docker/setup-qemu-action@v2 | ||||
| # Setup Docker Buildx with container driver | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| - name: Set up Docker Buildx | ||||
| uses: docker/setup-buildx-action@v3 | ||||
| with: | ||||
| driver: docker-container | ||||
| platforms: linux/amd64,linux/arm64,linux/ppc64le | ||||
| - name: Login to Registry | ||||
| uses: docker/login-action@v3 | ||||
| with: | ||||
|
|
@@ -81,7 +92,8 @@ jobs: | |||
| do | ||||
| docker manifest create ${{ env.REGISTRY }}/base-developer-image:${tag} \ | ||||
| --amend ${{ env.REGISTRY }}/base-developer-image:amd64-${{env.short_sha}} \ | ||||
| --amend ${{ env.REGISTRY }}/base-developer-image:arm64-${{env.short_sha}} | ||||
| --amend ${{ env.REGISTRY }}/base-developer-image:arm64-${{env.short_sha}} \ | ||||
| --amend ${{ env.REGISTRY }}/base-developer-image:ppc64le-${{env.short_sha}} | ||||
|
|
||||
| docker manifest annotate ${{ env.REGISTRY }}/base-developer-image:${tag} \ | ||||
| ${{ env.REGISTRY }}/base-developer-image:amd64-${{env.short_sha}} \ | ||||
|
|
@@ -90,6 +102,10 @@ jobs: | |||
| docker manifest annotate ${{ env.REGISTRY }}/base-developer-image:${tag} \ | ||||
| ${{ env.REGISTRY }}/base-developer-image:arm64-${{env.short_sha}} \ | ||||
| --os linux --arch arm64 | ||||
|
|
||||
| docker manifest annotate ${{ env.REGISTRY }}/base-developer-image:${tag} \ | ||||
| ${{ env.REGISTRY }}/base-developer-image:ppc64le-${{env.short_sha}} \ | ||||
| --os linux --arch ppc64le | ||||
|
|
||||
| docker manifest push ${{ env.REGISTRY }}/base-developer-image:${tag} | ||||
| done | ||||
|
|
@@ -99,25 +115,38 @@ jobs: | |||
| strategy: | ||||
| fail-fast: false | ||||
| matrix: | ||||
| runners: ['ubuntu-22.04', 'ubuntu-22.04-arm'] | ||||
| runs-on: ${{matrix.runners}} | ||||
| include: | ||||
| - name: amd64-build | ||||
| runner: ubuntu-22.04 | ||||
| arch: amd64 | ||||
| - name: arm64-build | ||||
| runner: ubuntu-22.04-arm | ||||
| arch: arm64 | ||||
| - name: ppc64le-build | ||||
| runner: ubuntu-22.04 | ||||
| arch: ppc64le | ||||
| runs-on: ${{ matrix.runner }} | ||||
| needs: publish-base-image | ||||
| steps: | ||||
| - name: Checkout | ||||
| uses: actions/checkout@v4 | ||||
| - name: Set arch environment variable | ||||
| run: | | ||||
| if [[ ${{matrix.runners}} == 'ubuntu-22.04' ]]; then | ||||
| echo arch="amd64" >> $GITHUB_ENV | ||||
| else | ||||
| echo arch="arm64" >> $GITHUB_ENV | ||||
| fi | ||||
| run: echo "arch=${{ matrix.arch }}" >> $GITHUB_ENV | ||||
| - name: Set short_sha environment variable | ||||
| run: echo short_sha="$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV | ||||
| - name: Free runner space | ||||
| run: sudo rm -rf /usr/local/lib/android | ||||
| - name: Cleanup docker images | ||||
| run: docker system prune -af | ||||
| # Setup QEMU for cross-platform builds | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| - name: Set up QEMU | ||||
| uses: docker/setup-qemu-action@v2 | ||||
| # Setup Docker Buildx with container driver | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| - name: Set up Docker Buildx | ||||
| uses: docker/setup-buildx-action@v3 | ||||
| with: | ||||
| driver: docker-container | ||||
| platforms: linux/amd64,linux/arm64,linux/ppc64le | ||||
| - name: Login to Registry | ||||
| uses: docker/login-action@v3 | ||||
| with: | ||||
|
|
@@ -153,7 +182,8 @@ jobs: | |||
| do | ||||
| docker manifest create ${{ env.REGISTRY }}/universal-developer-image:${tag} \ | ||||
| --amend ${{ env.REGISTRY }}/universal-developer-image:amd64-${{env.short_sha}} \ | ||||
| --amend ${{ env.REGISTRY }}/universal-developer-image:arm64-${{env.short_sha}} | ||||
| --amend ${{ env.REGISTRY }}/universal-developer-image:arm64-${{env.short_sha}} \ | ||||
| --amend ${{ env.REGISTRY }}/universal-developer-image:ppc64le-${{env.short_sha}} | ||||
|
|
||||
| docker manifest annotate ${{ env.REGISTRY }}/universal-developer-image:${tag} \ | ||||
| ${{ env.REGISTRY }}/universal-developer-image:amd64-${{env.short_sha}} \ | ||||
|
|
@@ -163,11 +193,13 @@ jobs: | |||
| ${{ env.REGISTRY }}/universal-developer-image:arm64-${{env.short_sha}} \ | ||||
| --os linux --arch arm64 | ||||
|
|
||||
| docker manifest annotate ${{ env.REGISTRY }}/universal-developer-image:${tag} \ | ||||
| ${{ env.REGISTRY }}/universal-developer-image:ppc64le-${{env.short_sha}} \ | ||||
| --os linux --arch ppc64le | ||||
|
|
||||
| docker manifest push ${{ env.REGISTRY }}/universal-developer-image:${tag} | ||||
| done | ||||
| - name: Get tag with uniq prefix | ||||
| id: setTagName | ||||
| # set the image with uniq tag prefix (for example: quay.io/..../base-developer-image:ubi9-7ad6cab) to env. var | ||||
| # and define it for output. This output with tag image will be used in caller job | ||||
| run: | | ||||
| echo "uniq_tag=${{ env.REGISTRY }}/universal-developer-image:ubi9-${{env.short_sha}}" >> $GITHUB_OUTPUT | ||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also have QEMU setup in this workflow (like ubi9-build.yaml)