Skip to content

Commit

Permalink
fix: disable arm64 builds
Browse files Browse the repository at this point in the history
qemu is too slow to build an image in 30mins on arm64.
and breaks trivy scanner
  • Loading branch information
Mossman1215 committed Nov 27, 2023
1 parent bacfb4b commit 599af39
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,10 @@ jobs:
run: |
echo "matrix-docker=$(jq --arg REF "$REF" -rMc '.build[] | select(.source | contains("Dockerfile")) | select(.buildOnMainOnly == null or $REF == "refs/heads/main") | . as $config | .destination | capture("(?<registry>.*)/(?<imageName>.*):(?<tag>.*)") | . as $imgSplit | $config | .source | capture("(?<context>.*)/Dockerfile") | . as $context | $config + $imgSplit + $context' -r -c <<< "$(yq e . -o json config.yaml)" | jq -rcsM '{"include":.}')" >> $GITHUB_OUTPUT
echo "matrix-apko=$(jq -rMc '.build[] | select(.source | contains("image.yaml"))' -r -c <<< "$(yq e . -o json config.yaml)" | jq -rcsM '{"include":.}')" >> $GITHUB_OUTPUT
echo "matrix-arm=$(jq --arg REF "$REF" -rMc '.build[] | select(.source | contains("Dockerfile")) | select(.buildOnArm == true) | . as $config | .destination | capture("(?<registry>.*)/(?<imageName>.*):(?<tag>.*)") | . as $imgSplit | $config | .source | capture("(?<context>.*)/Dockerfile") | . as $context | $config + $imgSplit + $context' -r -c <<< "$(yq e . -o json config.yaml)" | jq -rcsM '{"include":.}')" >> $GITHUB_OUTPUT
- name: check output
run: |
jq . <<< '${{ steps.set.outputs.matrix-docker }}'
jq . <<< '${{ steps.set.outputs.matrix-apko }}'
jq . <<< '${{ steps.set.outputs.matrix-arm }}'
build-docker:
needs: prepare
if: fromJSON(needs.prepare.outputs.matrix-docker) != null
Expand All @@ -54,20 +52,6 @@ jobs:
tags: ${{ fromJSON(toJSON(matrix)).tag }}
platforms: linux/amd64
push: ${{ github.ref == 'refs/heads/main' }}
build-arm64:
needs: prepare
if: fromJSON(needs.prepare.outputs.matrix-arm) != null
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.prepare.outputs.matrix-arm) }}
uses: GeoNet/Actions/.github/workflows/reusable-docker-build.yml@main
with:
context: ${{ fromJSON(toJSON(matrix)).context }}
dockerfile: ${{ fromJSON(toJSON(matrix)).source }}
imageName: ${{ fromJSON(toJSON(matrix)).imageName }}
tags: ${{ fromJSON(toJSON(matrix)).tag }}
platforms: linux/arm64
push: ${{ github.ref == 'refs/heads/main' }}
build-apko:
needs: prepare
if: fromJSON(needs.prepare.outputs.matrix-apko) != null
Expand Down
1 change: 0 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,3 @@ build:
- source: ./images/rpmbuild-fedora/Dockerfile
destination: ghcr.io/geonet/base-images/rpmbuild-fedora:latest
buildOnMainOnly: true
buildOnArm: true

0 comments on commit 599af39

Please sign in to comment.