Updated github action files to better complete CI tasks. (#24)

Updated Dockerfile to build a more correct,
This commit is contained in:
Michael Bailey 2024-09-09 20:36:50 +01:00 committed by GitHub
parent b8c83e7853
commit bf80015145
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 7 deletions

View File

@ -13,7 +13,7 @@ jobs:
steps:
- name: Install protobuffer compiler
run: sudo apt-get install -y protobuf-compiler
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: check
run: cargo check --verbose
- name: test

View File

@ -1,12 +1,18 @@
# First stage: build the server file.
FROM rust:alpine AS build
# Build dependencies
RUN apk add musl-dev
RUN apk upgrade --update-cache --available && \
apk add openssl-dev && \
rm -rf /var/cache/apk/*
RUN apk add openssl-dev
RUN apk add protobuf
COPY . .
CMD ["cargo", "run", "--release", "--bin", "server"]
RUN cargo build --release --bin server
FROM alpine:latest AS exec
RUN apk add openssl-dev
COPY --from=build ./target/release/server /server/server
CMD ["/server/server"]