File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ name: Create and publish Docker image to GHCR
5
5
on :
6
6
workflow_dispatch :
7
7
push :
8
- branches : ['master ']
8
+ branches : ['main ']
9
9
10
10
jobs :
11
11
build-and-push-image :
Original file line number Diff line number Diff line change 1
1
# Build Stage
2
2
FROM rust:slim-bullseye AS builder
3
- WORKDIR /build
3
+ WORKDIR /builder
4
4
5
+ RUN cargo init
5
6
# Compile deps in a separate layer (for caching)
6
7
COPY Cargo.toml Cargo.lock ./
7
- # Cargo requires at least one source file for compiling dependencies
8
- RUN mkdir src && echo "fn main() { println!(\" Hello, world!\" ); }" > src/main.rs
9
8
RUN apt-get update
10
9
RUN apt install -y pkg-config libssl-dev
11
10
RUN cargo build --release
@@ -18,5 +17,5 @@ RUN cargo build --release
18
17
19
18
# Release Stage
20
19
FROM debian:bullseye-slim AS release
21
- COPY --from=builder /build /target/release/root /usr/local/bin
20
+ COPY --from=builder /builder /target/release/root /usr/local/bin
22
21
CMD ["/usr/local/bin/root" ]
You can’t perform that action at this time.
0 commit comments