Skip to content

Commit

Permalink
Separate Build step for arm64
Browse files Browse the repository at this point in the history
Separate the steps for:
	sources
	reactions
	query-container
	control-plane

Use if-condition in build-reaction steps
  • Loading branch information
amansinghoriginal committed Feb 27, 2025
1 parent 387570a commit 78ef943
Showing 1 changed file with 43 additions and 9 deletions.
52 changes: 43 additions & 9 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,21 @@ jobs:
restore-keys: |
buildx-${{ matrix.component.name }}
- name: Build and Push to GHCR
- name: Build and Push to GHCR for amd64
run: |
cd ${{ matrix.component.path }}
DOCKER_TAG_VERSION=${{ inputs.tag }} \
IMAGE_PREFIX=${{ inputs.image_prefix }} \
DOCKERX_OPTS="--push --platform linux/amd64,linux/arm64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
make
DOCKERX_OPTS="--push --platform linux/amd64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
make
- name: Build and Push to GHCR for arm64
run: |
cd ${{ matrix.component.path }}
DOCKER_TAG_VERSION=${{ inputs.tag }} \
IMAGE_PREFIX=${{ inputs.image_prefix }} \
DOCKERX_OPTS="--push --platform linux/arm64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
make
build-control-plane:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -159,12 +167,20 @@ jobs:
restore-keys: |
buildx-${{ matrix.component.name }}
- name: Build and Push to GHCR
- name: Build and Push to GHCR for amd64
run: |
cd ${{ matrix.component.path }}
DOCKER_TAG_VERSION=${{ inputs.tag }} \
IMAGE_PREFIX=${{ inputs.image_prefix }} \
DOCKERX_OPTS="--push --platform linux/amd64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
make
- name: Build and Push to GHCR for arm64
run: |
cd ${{ matrix.component.path }}
DOCKER_TAG_VERSION=${{ inputs.tag }} \
IMAGE_PREFIX=${{ inputs.image_prefix }} \
DOCKERX_OPTS="--push --platform linux/amd64,linux/arm64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
DOCKERX_OPTS="--push --platform linux/arm64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
make
Expand Down Expand Up @@ -274,12 +290,20 @@ jobs:
restore-keys: |
buildx-${{ matrix.component.name }}
- name: Build and Push to GHCR
- name: Build and Push to GHCR for amd64
run: |
cd ${{ matrix.component.path }}
DOCKER_TAG_VERSION=${{ inputs.tag }} \
IMAGE_PREFIX=${{ inputs.image_prefix }} \
DOCKERX_OPTS="--push --platform linux/amd64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
make
- name: Build and Push to GHCR for arm64
run: |
cd ${{ matrix.component.path }}
DOCKER_TAG_VERSION=${{ inputs.tag }} \
IMAGE_PREFIX=${{ inputs.image_prefix }} \
DOCKERX_OPTS="--push --platform linux/amd64,linux/arm64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
DOCKERX_OPTS="--push --platform linux/arm64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
make
build-reactions:
Expand Down Expand Up @@ -375,12 +399,22 @@ jobs:
restore-keys: |
buildx-${{ matrix.component.name }}
- name: Build and Push to GHCR
- name: Build and Push to GHCR for amd64
if: contains(matrix.component.platforms, 'linux/amd64')
run: |
cd ${{ matrix.component.path }}
DOCKER_TAG_VERSION=${{ inputs.tag }} \
IMAGE_PREFIX=${{ inputs.image_prefix }} \
DOCKERX_OPTS="--push --platform linux/amd64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
make
- name: Build and Push to GHCR for arm64
if: contains(matrix.component.platforms, 'linux/arm64')
run: |
cd ${{ matrix.component.path }}
DOCKER_TAG_VERSION=${{ inputs.tag }} \
IMAGE_PREFIX=${{ inputs.image_prefix }} \
DOCKERX_OPTS="--push --platform ${{ matrix.component.platforms }} --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
DOCKERX_OPTS="--push --platform linux/arm64 --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --cache-from type=local,src=/tmp/.buildx-cache" \
make
build-cli:
Expand Down

0 comments on commit 78ef943

Please sign in to comment.