redhat-actions / buildah-build

GitHub Action to use 'buildah' to build a container image.
https://github.com/marketplace/actions/buildah-build
MIT License
136 stars 35 forks source link

[FEATURE] Support `--jobs N` flag on buildah bud #115

Open anthr76 opened 1 year ago

anthr76 commented 1 year ago

Is your feature request related to a problem? Please describe.

In order to possibly speed up builds support the --jobs argument

Describe the solution you'd like

--jobs N

Run up to N concurrent stages in parallel. If the number of jobs is greater than 1, stdin will be read from /dev/null. If 0 is specified, then there is no limit on the number of jobs that run in parallel.

REF: https://github.com/containers/buildah/blob/main/docs/buildah-build.1.md

Describe alternatives you've considered

Additional context

This can help to greatly reduce build times for large multi-arch builds.

akostadinov commented 1 year ago

+1, for some reason adding as extra args seems to be ignored

      - name: Build image
        id: build-image
        uses: redhat-actions/buildah-build@v2
        with:
          tags: ${{ steps.meta.outputs.tags }}
          platforms: linux/amd64,linux/s390x,linux/ppc64le
          labels: ${{ steps.meta.outputs.labels }}
          layers: false
          oci: true
          tls-verify: true
          extra-args: |
            --squash
            --jobs=3
          build-args: |
            PORTA_IMAGE=quay.io/3scale/porta:free-sphinx
          containerfiles: |
            Containerfile