Build application outside docker for ci.

This commit is contained in:
Kavin 2022-10-25 10:19:41 +01:00
parent cccc095de8
commit f4d8e01841
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD
2 changed files with 20 additions and 1 deletions

View file

@ -12,6 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build Cargo
run: cargo build --release && mv target/release/sponsorblock-mirror .
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
@ -30,7 +33,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
file: ./Dockerfile.ci
platforms: linux/amd64
push: true
tags: 1337kavin/sponsorblock-mirror:latest

16
Dockerfile.ci Normal file
View file

@ -0,0 +1,16 @@
FROM debian:stable-slim
RUN --mount=type=cache,target=/var/cache/apt \
apt-get update && \
apt-get install -y --no-install-recommends \
libssl1.1 libpq5 ca-certificates && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app/
COPY ./sponsorblock-mirror .
COPY ./Rocket.toml .
EXPOSE 8000
CMD ["/app/sponsorblock-mirror"]