File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+ on :
3
+ push :
4
+ branches :
5
+ - main
6
+
7
+ jobs :
8
+ test :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - name : Build Docker image
13
+ run : docker build -t registry.heroku.com/${{ secrets.HEROKU_APP }}/web:latest .
14
+
15
+ - name : Docker image info
16
+ run : docker images
17
+
18
+ - name : Login to container registry
19
+ env :
20
+ HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
21
+ run : heroku container:login
22
+
23
+ - name : Push Docker image
24
+ run : docker push registry.heroku.com/${{ secrets.HEROKU_APP }}/web
25
+
26
+ - name : Release
27
+ env :
28
+ HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
29
+ run : heroku container:release -a ${{ secrets.HEROKU_APP }} web
Original file line number Diff line number Diff line change
1
+ FROM rust:1.60 as build
2
+
3
+ RUN USER=root cargo new --bin holy
4
+ WORKDIR /holy
5
+
6
+ COPY ./Cargo.lock ./Cargo.lock
7
+ COPY ./Cargo.toml ./Cargo.toml
8
+ RUN cargo build --release
9
+
10
+ RUN rm src/*.rs
11
+ COPY ./src ./src
12
+
13
+ RUN rm ./target/release/deps/holy*
14
+ RUN cargo build --release
15
+
16
+ FROM debian:buster-slim
17
+ COPY --from=build /holy/target/release/holy .
18
+
19
+ CMD ["./holy" ]
You can’t perform that action at this time.
0 commit comments