Skip to content

Commit bc8605d

Browse files
authored
Merge pull request #93 from bqbooster/fix-docker
fix docker image
2 parents 48985b6 + fcfae7d commit bc8605d

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed
+18-6
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
11
name: Build base image for CI
22

33
on:
4-
workflow_dispatch:
54
pull_request:
65
branches:
76
- main
87
paths:
98
- 'Dockerfile'
109
- 'Makefile'
10+
workflow_dispatch:
11+
12+
# GitHub secrets
13+
env:
14+
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
15+
IMAGE_NAME: dbt-bigquery-monitoring-base
16+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
1117

1218
jobs:
1319
build-base-image:
1420
name: Build base image
1521
runs-on: ubuntu-latest
22+
1623
steps:
17-
- uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
20-
2124
- name: Checkout
2225
uses: actions/checkout@v4
2326
with:
2427
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
2528

29+
- name: Log in to Docker Hub
30+
run: |
31+
echo ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | docker login ${{ secrets.DOCKER_REGISTRY }} -u ${{ secrets.DOCKER_REGISTRY_USER }} --password-stdin
32+
2633
- name: Build base image
2734
run: |
28-
make build
35+
docker build -t $IMAGE_NAME:$BRANCH_NAME .
36+
37+
- name: Push base image
38+
run: |
39+
docker tag $IMAGE_NAME:$BRANCH_NAME $DOCKER_REGISTRY/$IMAGE_NAME:$BRANCH_NAME
40+
docker push $DOCKER_REGISTRY/$IMAGE_NAME:$BRANCH_NAME
2941

Dockerfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust.sh \
3939

4040
# Add Cargo to PATH
4141
ENV PATH="/root/.cargo/bin:${PATH}"
42-
RUN cargo
4342

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

5554
WORKDIR /usr/app/
56-
ENTRYPOINT ["zsh"]
55+
ENTRYPOINT ["bash"]

0 commit comments

Comments
 (0)