Skip to content

Commit

Permalink
Merge branch 'main' into dristy-azure-client-secret
Browse files Browse the repository at this point in the history
  • Loading branch information
dristysrivastava authored Sep 18, 2024
2 parents cfe749d + 67fd5d3 commit 4a05ecd
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 10 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docker_multiarch_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: ci-docker-multi-arch
on:
push:
tags:
- "v[0-9].[0-9]+.[0-9]+*"

jobs:
docker:
name: Build base image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Get Release Tag
run: |
TAG=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
echo "VERSION=$(echo $TAG | sed 's/v//')" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./deploy/docker
push: true
tags: daxaai/pebblo:${{ env.VERSION }}
platforms: linux/amd64,linux/arm64
file: ./deploy/docker/Dockerfile.base
build-args: |
"build_image=python:3.11"
"base_image=python:3.11"
"pebblo_branch=${{ env.VERSION }}"
4 changes: 1 addition & 3 deletions .github/workflows/docker_release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Docker image release

on:
push:
tags:
- "v[0-9].[0-9]+.[0-9]+*"
workflow_dispatch:
jobs:
build-and-push:
name: Build base image
Expand Down
14 changes: 7 additions & 7 deletions deploy/docker/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG build_image
ARG base_image
ARG pebblo_version
ARG build_image=python:3.11
ARG base_image=python:3.11
ARG pebblo_branch=main

FROM $build_image AS base
FROM --platform=$BUILDPLATFORM $build_image AS base

RUN mkdir /opt/pebblo && apt-get update && \
apt-get install -y --no-install-recommends \
Expand All @@ -11,12 +11,12 @@ RUN mkdir /opt/pebblo && apt-get update && \

WORKDIR /opt/pebblo

RUN git clone https://github.com/daxa-ai/pebblo.git /opt/pebblo && git checkout $pebblo_version
RUN git clone https://github.com/daxa-ai/pebblo.git /opt/pebblo && git checkout $pebblo_branch

RUN pip install weasyprint && pip install build && python -m build --wheel && pip install dist/*.whl
RUN pip install weasyprint build && python -m build --wheel && pip install dist/*.whl

# Stage 2
FROM $base_image
FROM --platform=$BUILDPLATFORM $base_image

RUN mkdir /opt/pebblo /opt/.pebblo /opt/pebblo/log /opt/pebblo/config

Expand Down

0 comments on commit 4a05ecd

Please sign in to comment.