Skip to content

Commit

Permalink
fix docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayrnt committed Dec 16, 2024
1 parent 48985b6 commit fcfae7d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/build_base_image.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,41 @@
name: Build base image for CI

on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- 'Dockerfile'
- 'Makefile'
workflow_dispatch:

# GitHub secrets
env:
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
IMAGE_NAME: dbt-bigquery-monitoring-base
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
build-base-image:
name: Build base image
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR

- name: Log in to Docker Hub
run: |
echo ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | docker login ${{ secrets.DOCKER_REGISTRY }} -u ${{ secrets.DOCKER_REGISTRY_USER }} --password-stdin
- name: Build base image
run: |
make build
docker build -t $IMAGE_NAME:$BRANCH_NAME .
- name: Push base image
run: |
docker tag $IMAGE_NAME:$BRANCH_NAME $DOCKER_REGISTRY/$IMAGE_NAME:$BRANCH_NAME
docker push $DOCKER_REGISTRY/$IMAGE_NAME:$BRANCH_NAME
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust.sh \

# Add Cargo to PATH
ENV PATH="/root/.cargo/bin:${PATH}"
RUN cargo

# Update pip and install Python dependencies
RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel
Expand All @@ -53,4 +52,4 @@ RUN pip install --no-cache-dir \
&& rm -rf /usr/local/share/doc /root/.cache/

WORKDIR /usr/app/
ENTRYPOINT ["zsh"]
ENTRYPOINT ["bash"]

0 comments on commit fcfae7d

Please sign in to comment.