Skip to content

Commit

Permalink
Install diesel to base builder instance
Browse files Browse the repository at this point in the history
  • Loading branch information
johnshaughnessy committed Nov 1, 2023
1 parent 35f4795 commit 9dbe228
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-server-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ jobs:
- 'server/Cargo.lock'
- id: "auth"
if: steps.changes.outputs.lock == 'true'
# if: steps.changes.outputs.lock == 'true'
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"

- name: "Set up Cloud SDK"
if: steps.changes.outputs.lock == 'true'
# if: steps.changes.outputs.lock == 'true'
uses: "google-github-actions/setup-gcloud@v1"

- name: Configure Docker to use Google Artifact Registry
if: steps.changes.outputs.lock == 'true'
# if: steps.changes.outputs.lock == 'true'
run: gcloud auth configure-docker us-central1-docker.pkg.dev

- name: Build Base Builder Image
if: steps.changes.outputs.lock == 'true'
# if: steps.changes.outputs.lock == 'true'
run: |
cd server
docker build -f Dockerfile.base-builder --target base-builder -t us-central1-docker.pkg.dev/hubs-dev-333333/ocho-osai/johnshaughnessy/track/track-base-builder .
Expand Down
1 change: 1 addition & 0 deletions server/Dockerfile.base-builder
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
FROM rust:1.73-slim-buster as base-builder
WORKDIR /usr/src/app
RUN apt-get update && apt-get install -y build-essential libpq-dev
cargo install diesel_cli --no-default-features --features postgres
COPY . .
# RUN cargo fetch # This fetches all dependencies as per Cargo.lock
RUN cargo build --release # This forces compilation of dependencies
Expand Down

0 comments on commit 9dbe228

Please sign in to comment.