Skip to content

Commit 9405f09

Browse files
authored
chore: build api-test image using buildkit on GitHub (#9093)
seperate it out into its own step so it can be built using https://docs.docker.com/develop/develop-images/build_enhancements/ so we can take advantage of it building the image faster and enable caching as well https://github.com/docker/build-push-action/blob/5e11b373bfed0d8024ef33d1586c675819690e95/docs/advanced/cache.md#github-cache
1 parent 9a6ebe2 commit 9405f09

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/run-api-tests.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,21 @@ jobs:
2525
run: |
2626
bash ./dhis-2/build-dev.sh
2727
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v1
30+
- name: Build test image
31+
uses: docker/build-push-action@v2
32+
with:
33+
context: dhis-2/dhis-e2e-test
34+
push: false
35+
load: true # https://github.com/docker/build-push-action/blob/5e11b373bfed0d8024ef33d1586c675819690e95/docs/advanced/export-docker.md
36+
tags: ${{ env.TEST_IMAGE_NAME }}
37+
cache-from: type=gha
38+
cache-to: type=gha,mode=max
2839
- name: Run tests
2940
run: |
3041
cd dhis-2/dhis-e2e-test
3142
IMAGE_NAME=$CORE_IMAGE_NAME docker-compose up -d
32-
docker build -t $TEST_IMAGE_NAME .
3343
IMAGE_NAME=$TEST_IMAGE_NAME docker-compose -f docker-compose.e2e.yml up --exit-code-from e2e-test
3444
3545
- name: Upload logs

0 commit comments

Comments
 (0)