From b4a0e1d1be5fdff076e4de4259f54a88b2689e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wo=C5=BAniak?= <17177420+wozniakpl@users.noreply.github.com> Date: Tue, 17 Sep 2024 10:46:09 +0200 Subject: [PATCH] add caching --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 016e908..0919c5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- - name: Build the Docker image run: | docker buildx create --use - docker buildx build \ --tag unicef/hope_country_workspace:${{ github.sha }} \ --load \ @@ -23,4 +29,4 @@ jobs: ./ - name: Run the tests run: | - docker compose -f ./.github/docker/compose.ci.yml up --exit-code-from tests \ No newline at end of file + image=unicef/hope_country_workspace:${{ github.sha }} docker compose -f ./.github/docker/compose.ci.yml up --exit-code-from tests \ No newline at end of file