File tree 2 files changed +19
-8
lines changed
2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 1
1
name : Build base image for CI
2
2
3
3
on :
4
- workflow_dispatch :
5
4
pull_request :
6
5
branches :
7
6
- main
8
7
paths :
9
8
- ' Dockerfile'
10
9
- ' 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 }}
11
17
12
18
jobs :
13
19
build-base-image :
14
20
name : Build base image
15
21
runs-on : ubuntu-latest
22
+
16
23
steps :
17
- - uses : actions/checkout@v4
18
- with :
19
- fetch-depth : 0
20
-
21
24
- name : Checkout
22
25
uses : actions/checkout@v4
23
26
with :
24
27
ref : ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
25
28
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
+
26
33
- name : Build base image
27
34
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
29
41
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rust.sh \
39
39
40
40
# Add Cargo to PATH
41
41
ENV PATH="/root/.cargo/bin:${PATH}"
42
- RUN cargo
43
42
44
43
# Update pip and install Python dependencies
45
44
RUN python -m pip install --no-cache-dir --upgrade pip setuptools wheel
@@ -53,4 +52,4 @@ RUN pip install --no-cache-dir \
53
52
&& rm -rf /usr/local/share/doc /root/.cache/
54
53
55
54
WORKDIR /usr/app/
56
- ENTRYPOINT ["zsh " ]
55
+ ENTRYPOINT ["bash " ]
You can’t perform that action at this time.
0 commit comments