-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
58 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
FROM rust:1.50-alpine3.13 as builder | ||
FROM rust:1.61-alpine3.16 as builder | ||
RUN apk update | ||
RUN apk add libc-dev openssl-dev openssl | ||
RUN apk add libc-dev openssl-dev openssl github-cli | ||
|
||
RUN USER=root cargo new --bin crom | ||
WORKDIR /crom | ||
COPY ./Cargo.toml ./Cargo.toml | ||
COPY ./Cargo.lock ./Cargo.lock | ||
RUN cargo build --release | ||
RUN cargo build --release --features gh-cli | ||
RUN rm src/*.rs | ||
|
||
ADD . ./ | ||
|
||
RUN rm ./target/release/deps/crom* | ||
RUN cargo run --release -- write-version next-release | ||
RUN cargo build --release | ||
RUN cargo run --release --features gh-cli -- write-version next-release | ||
RUN cargo run --release --features gh-cli -- gh --help | ||
RUN cargo build --release --features gh-cli | ||
|
||
FROM alpine:3.11 | ||
FROM alpine:3.16 as release | ||
|
||
RUN apk add --no-cache ca-certificates openssl tzdata | ||
RUN apk add --no-cache ca-certificates openssl tzdata github-cli | ||
COPY --from=builder /crom/target/release/crom /usr/bin/crom | ||
|
||
WORKDIR /target | ||
|
||
ENTRYPOINT ["/usr/bin/crom"] | ||
ENTRYPOINT ["/usr/bin/crom"] | ||
|
||
# Run basic test | ||
RUN crom --help && crom gh --help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters