From e79397fdd1fe8f3ef7073782d53883632abce9f5 Mon Sep 17 00:00:00 2001 From: Andrew Mayorov Date: Wed, 3 Aug 2022 12:06:12 +0300 Subject: [PATCH] Speed up multiarch image builds under GH Actions --- .github/workflows/build-image.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index ff53b0e..96df5c5 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -15,6 +15,16 @@ jobs: build-push: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + # Precompile applications under `prod` profile + - run: rebar3 as prod compile + # Clean out those applications that MUST be compiled on the target system: + # 1. Applications that employ native code in the form of NIFs or port drivers. + - run: > + for app in $(grep -Rl -F 'port_specs' _build/prod/lib/*/rebar.config | cut -d'/' -f4) + do + rebar3 as prod clean --apps $app + done - uses: valitydev/action-deploy-docker@v2 with: registry-username: ${{ github.actor }}