-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (33 loc) · 1.02 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Docker
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
matrix:
rust-features: ["default", "integration-testing"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: git
run: echo "GIT_REVISION=$(git describe --always --dirty=-modified)" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver: docker-container
use: true
- name: Build
uses: docker/build-push-action@v4
with:
context: .
push: false
cache-from: |
type=gha,scope=main-${{ matrix.rust-features }}
type=gha,scope=${{ github.ref_name }}-${{ matrix.rust-features }}
cache-to: type=gha,scope=${{ github.ref_name }}-${{ matrix.rust-features }},mode=max
build-args: |
GIT_REVISION=${{ steps.git.outputs.GIT_REVISION }}
RUST_FEATURES=${{ matrix.rust-features }}