diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 3bd8c9a..98c0a10 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -83,4 +83,27 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Run Tests - run: cargo test --all-features \ No newline at end of file + 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 . \ No newline at end of file