diff --git a/.github/workflows/checks_docker.yaml b/.github/workflows/checks_docker.yaml index 7d9aa485..aa9dcb58 100644 --- a/.github/workflows/checks_docker.yaml +++ b/.github/workflows/checks_docker.yaml @@ -1,10 +1,11 @@ -name: Nightly Docker Build +name: Docker Build on: - schedule: - # Runs at 00:00 UTC every day - - cron: "0 0 * * *" - workflow_dispatch: # Allows manual triggering + workflow_dispatch: + pull_request: + merge_group: + push: + branches: [develop] jobs: build-docker: diff --git a/Dockerfile b/Dockerfile index a5749ba5..f6863939 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,10 +26,7 @@ ENV SCCACHE_DIR=/sccache FROM base AS planner WORKDIR /app -COPY ./Cargo.lock ./Cargo.lock -COPY ./Cargo.toml ./Cargo.toml -COPY ./.git ./.git -COPY ./crates/ ./crates/ +COPY . . RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/git \ @@ -49,10 +46,7 @@ COPY --from=planner /app/recipe.json recipe.json RUN --mount=type=cache,target=$SCCACHE_DIR,sharing=locked \ cargo chef cook --release --recipe-path recipe.json -COPY ./Cargo.lock ./Cargo.lock -COPY ./Cargo.toml ./Cargo.toml -COPY ./.git ./.git -COPY ./crates/ ./crates/ +COPY . . RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/usr/local/cargo/git \