Skip to content

Commit 0f93bac

Browse files
committed
feat(workflows): Add docker build workflow
Add docker build workflow to build and publish image in ghcr.io. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
1 parent b2959ba commit 0f93bac

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

.github/workflows/docker.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
release:
3+
types: [created]
4+
workflow_dispatch:
5+
6+
name: Build docker image
7+
jobs:
8+
build:
9+
name: KernelCI Storage Docker image
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Docker Buildx
14+
uses: docker/setup-buildx-action@v3
15+
- name: Login to ghcr.io
16+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
17+
- name: Build and push
18+
# running ARM64 will take a long time (1hr+), so we only build for AMD64 for now
19+
# run: |
20+
# docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/nuclearcat/kernelci-storage:latest --push .
21+
run: |
22+
docker buildx build --platform linux/amd64 -t ghcr.io/nuclearcat/kernelci-storage:latest --push .
23+
24+

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ COPY . .
44
RUN cargo install --path .
55

66
FROM debian:bookworm-slim
7-
#RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*
87
RUN apt-get update && rm -rf /var/lib/apt/lists/*
98
COPY --from=builder /usr/local/cargo/bin/kernelci-storage /usr/local/bin/kernelci-storage
109
CMD ["kernelci-storage"]

0 commit comments

Comments
 (0)