Skip to content

Commit 7de460f

Browse files
committed
refactor: use docker build action
1 parent ebb1bb5 commit 7de460f

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/tests.yaml

+18-6
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,31 @@ jobs:
3939
api-integration-tests:
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@v4
42+
- name: "Setup: checkout repository"
43+
uses: actions/checkout@v4
4344

44-
- name: "Login to GitHub Container Registry"
45+
- name: "Setup: Login to GitHub Container Registry"
4546
uses: docker/login-action@v3
4647
with:
4748
registry: ${{ env.IMAGE_REGISTRY }}
4849
username: ${{ github.actor }}
4950
password: ${{ secrets.GITHUB_TOKEN }}
5051

51-
- name: Build API image
52-
run: |
53-
docker pull $API_IMAGE
54-
docker build --target development --tag api-development ./api # TODO: --cache-from $API_IMAGE
52+
- name: "Setup: Docker Buildx"
53+
uses: docker/setup-buildx-action@v3
54+
55+
- name: "Setup: Build API image"
56+
uses: docker/build-push-action@v6
57+
with:
58+
context: ./api
59+
target: development
60+
tags: ${{ env.API_IMAGE }}
61+
cache-from: type=registry,ref=user/app:buildcache
62+
63+
# - name: Build API image
64+
# run: |
65+
# docker pull $API_IMAGE
66+
# docker build --target development --tag api-development ./api # TODO: --cache-from $API_IMAGE
5567

5668
- name: BDD Integration tests
5769
if: ${{ false }} # disable for now

0 commit comments

Comments
 (0)