From 7e2df6b9df264dd0d29dab39ab26e0c2500ae484 Mon Sep 17 00:00:00 2001 From: Kyrylo Shpytsya Date: Fri, 7 Aug 2020 15:35:26 +0300 Subject: [PATCH] CI: Pre-pull docker images to optimize caching Also, switch to pierrezemb/gostatic:latest instead of specific hash due to https://github.com/satackey/action-docker-layer-caching/issues/17 --- .github/workflows/ci.yml | 8 +++++++- tests/test-in-docker | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bfd87a3..2028e29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - run: > + echo ::set-env name=K8S_EMUL_IMAGE::kyryloshpytsyaprismai/k8s-emul:sha-${GITHUB_SHA::7} + - name: Pull Docker images + run: > + cd tests && + docker-compose pull - name: Pull Docker layer cache uses: satackey/action-docker-layer-caching@v0.0.5 - name: Run tests run: > sudo - K8S_EMUL_IMAGE=kyryloshpytsyaprismai/k8s-emul:sha-${GITHUB_SHA::7} + --preserve-env=K8S_EMUL_IMAGE ./run-tests diff --git a/tests/test-in-docker b/tests/test-in-docker index 27acea6..60c81a9 100755 --- a/tests/test-in-docker +++ b/tests/test-in-docker @@ -43,7 +43,7 @@ cat >test-job.json <<'_END_' "Driver": "docker", "User": "", "Config": { - "image": "pierrezemb/gostatic@sha256:e28d48e17840c5104b5133c30851ac45903b1d2f268d108c4cd0884802c9c87e", + "image": "pierrezemb/gostatic:latest", "args": [ "-enable-health" ],