Skip to content

Commit

Permalink
enhance CI workflow with Docker Buildx setup and improved build command
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzbornik committed Nov 21, 2024
1 parent 537ae71 commit 669d1f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true
driver-opts: image=moby/buildkit:buildx-stable,network=host

- name: Cache Docker layers
uses: actions/cache@v3
Expand All @@ -29,7 +32,7 @@ jobs:
${{ runner.os }}-buildx-
- name: Build Docker image
run: docker build --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache -t my-app .
run: docker buildx build --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache --output=type=docker -t my-app .

- name: Run tests
run: docker run my-app pytest

0 comments on commit 669d1f1

Please sign in to comment.