Skip to content

Commit

Permalink
fixup! build: allow building of arm images when a specific label is a…
Browse files Browse the repository at this point in the history
…dded
  • Loading branch information
Taepper committed Jan 20, 2025
1 parent fb02476 commit 2dbe197
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,40 +126,42 @@ jobs:
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=commit-${{ env.HEAD_SHA }}
- name: Build unit test image
- name: Build and push production image
if: env.PLATFORM_BUILD == 'true'
uses: docker/build-push-action@v6
with:
context: .
target: builder
tags: builder
load: true
push: true
platforms: "${{ matrix.os }}/${{ matrix.arch }}"
cache-from: type=gha,ref=${{ github.ref_name }}-image-cache
cache-to: type=gha,mode=min,ref=${{ github.ref_name }}-image-cache
tags: ${{ steps.dockerMetadataImage.outputs.tags }}
build-args: |
DEPENDENCY_IMAGE=${{ env.DOCKER_DEPENDENCY_IMAGE_NAME }}:commit-${{ env.HEAD_SHA }}
- name: Run unit tests
if: env.PLATFORM_BUILD == 'true'
run: |
docker run \
--entrypoint "./silo_test" \
builder
- name: Build and push production image
if: env.PLATFORM_BUILD == 'true'
unitTests:
name: Unit tests
needs: dockerImageUnitTests
runs-on: ubuntu-latest
steps:
- name: Build unit test image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: "${{ matrix.os }}/${{ matrix.arch }}"
target: builder
tags: builder
load: true
cache-from: type=gha,ref=${{ github.ref_name }}-image-cache
cache-to: type=gha,mode=min,ref=${{ github.ref_name }}-image-cache
tags: ${{ steps.dockerMetadataImage.outputs.tags }}
build-args: |
DEPENDENCY_IMAGE=${{ env.DOCKER_DEPENDENCY_IMAGE_NAME }}:commit-${{ env.HEAD_SHA }}
- name: Run unit tests
run: |
docker run \
--entrypoint "./silo_test" \
builder
endToEndTests:
name: Run End To End Tests
needs: dockerImageUnitTests
Expand Down

0 comments on commit 2dbe197

Please sign in to comment.