From f0e512ec25361058819e7d860e5c3b68b75997e6 Mon Sep 17 00:00:00 2001 From: Rohan Sircar Date: Wed, 21 Apr 2021 15:48:58 +0530 Subject: [PATCH] Add docker build to ci --- .github/workflows/ci.yml | 16 ++++++++++++++-- Dockerfile | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dd7e78..04424f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,14 +83,14 @@ jobs: args: -- -D warnings build: - name: Build Application + name: Build Binaries runs-on: ubuntu-latest needs: [check, test, lints] strategy: matrix: target: - x86_64-unknown-linux-gnu - - aarch64-unknown-linux-gnu + # - aarch64-unknown-linux-gnu # - powerpc64-unknown-linux-gnu steps: - uses: actions/checkout@v2 @@ -106,3 +106,15 @@ jobs: use-cross: true command: build args: --release --target=${{ matrix.target }} + + build-docker: + name: Build Docker Image + runs-on: ubuntu-latest + needs: [check, test, lints] + steps: + - uses: actions/checkout@v2 + - name: Docker layer cache + uses: satackey/action-docker-layer-caching@v0.0.11 + continue-on-error: true + - name: Build Image + run: docker build -t rohansircar/actix-demo:latest . diff --git a/Dockerfile b/Dockerfile index 0894500..ddb9774 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.45 as builder +FROM rust:1.51 as builder # ENV CARGO_HOME=/actix-demo/.cargo RUN USER=root cargo new --bin actix-demo