Skip to content

Commit

Permalink
Use nproc instead of default for job numbers in docker build to avoid…
Browse files Browse the repository at this point in the history
… timeout (#1272)
  • Loading branch information
PragmaTwice authored Feb 21, 2023
1 parent da4dcfe commit 69a9bda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/kvrocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,13 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get core numbers
run: echo "NPROC=$(nproc)" >> $GITHUB_ENV
- uses: docker/build-push-action@v3
with:
context: .
build-args: |
MORE_BUILD_ARGS=-j${{ env.NPROC }}
required:
if: always()
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Get core numbers
run: echo "NPROC=$(nproc)" >> $GITHUB_ENV

- name: Docker meta
id: meta
Expand All @@ -64,3 +67,5 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
MORE_BUILD_ARGS=-j${{ env.NPROC }}

0 comments on commit 69a9bda

Please sign in to comment.