Skip to content

Commit

Permalink
Adding docker-build job
Browse files Browse the repository at this point in the history
  • Loading branch information
mjovanc committed Dec 17, 2024
1 parent ca83044 commit 9ca3603
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,27 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Run Tests
run: cargo test --all-features
run: cargo test --all-features

docker-build:
name: Docker Build
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ 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 --tag my-image:latest .

0 comments on commit 9ca3603

Please sign in to comment.