Skip to content

Commit

Permalink
CI: Pre-pull docker images to optimize caching
Browse files Browse the repository at this point in the history
Also, switch to pierrezemb/gostatic:latest instead
of specific hash due to
satackey/action-docker-layer-caching#17
  • Loading branch information
kyrylo-shpytsya-prism committed Aug 7, 2020
1 parent 54cc5e4 commit 7e2df6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
- name: Run tests
run: >
sudo
K8S_EMUL_IMAGE=kyryloshpytsyaprismai/k8s-emul:sha-${GITHUB_SHA::7}
--preserve-env=K8S_EMUL_IMAGE
./run-tests
2 changes: 1 addition & 1 deletion tests/test-in-docker
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down

0 comments on commit 7e2df6b

Please sign in to comment.