File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 4040 - run : pip-licenses
4141
4242 operator-image-buildable :
43+ env :
44+ USE_ELASTIC_REGISTRY : ${{ github.event_name != 'pull_request' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false && github.actor != 'dependabot[bot]' ) }}
4345 runs-on : ubuntu-latest
4446 steps :
4547 - uses : actions/checkout@v4
5456 registry : ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
5557 username : ${{ secrets.ELASTIC_DOCKER_USERNAME }}
5658 password : ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
59+ if : ${{ env.USE_ELASTIC_REGISTRY == 'true' }}
5760 - run : docker build -f operator/Dockerfile --build-arg DISTRO_DIR=./dist .
61+ if : ${{ env.USE_ELASTIC_REGISTRY == 'true' }}
62+ - run : docker build -f operator/Dockerfile --build-arg PYTHON_GLIBC_IMAGE=cgr.dev/chainguard/python --build-arg PYTHON_GLIBC_IMAGE_VERSION=latest-dev --build-arg DISTRO_DIR=./dist --build-arg IMAGE=cgr.dev/chainguard/bash --build-arg IMAGE_VERSION=latest .
63+ if : ${{ env.USE_ELASTIC_REGISTRY != 'true'}}
5864
5965 test :
6066 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1- FROM docker.elastic.co/wolfi/python:3.12-dev@sha256:2f10787cc037b197f6a5d1a031c31706ae59642708c8b3b5ddfd3fa79605e9ad AS build
1+ ARG PYTHON_GLIBC_IMAGE="docker.elastic.co/wolfi/python"
2+ ARG PYTHON_GLIBC_IMAGE_VERSION="3.12-dev@sha256:2f10787cc037b197f6a5d1a031c31706ae59642708c8b3b5ddfd3fa79605e9ad"
3+
4+ ARG IMAGE="docker.elastic.co/wolfi/chainguard-base"
5+ ARG IMAGE_VERSION="latest@sha256:26caa6beaee2bbf739a82e91a35173892dfe888d0a744b9e46cdc19a90d8656f"
6+
7+ FROM ${PYTHON_GLIBC_IMAGE}:${PYTHON_GLIBC_IMAGE_VERSION} AS build
28
39ENV LANG=C.UTF-8
410ENV PYTHONDONTWRITEBYTECODE=1
@@ -32,7 +38,7 @@ RUN apk add gcc g++ python3-dev musl-dev linux-headers
3238
3339RUN pip install --no-cache-dir --target workspace /opt/distro/*.whl -r requirements.txt
3440
35- FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:26caa6beaee2bbf739a82e91a35173892dfe888d0a744b9e46cdc19a90d8656f
41+ FROM ${IMAGE}:${IMAGE_VERSION}
3642
3743COPY --from=build /operator-build/workspace /autoinstrumentation
3844COPY --from=build-musl /operator-build/workspace /autoinstrumentation-musl
You can’t perform that action at this time.
0 commit comments