File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 40
40
- run : pip-licenses
41
41
42
42
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]' ) }}
43
45
runs-on : ubuntu-latest
44
46
steps :
45
47
- uses : actions/checkout@v4
54
56
registry : ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
55
57
username : ${{ secrets.ELASTIC_DOCKER_USERNAME }}
56
58
password : ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
59
+ if : ${{ env.USE_ELASTIC_REGISTRY == 'true' }}
57
60
- 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'}}
58
64
59
65
test :
60
66
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
2
8
3
9
ENV LANG=C.UTF-8
4
10
ENV PYTHONDONTWRITEBYTECODE=1
@@ -32,7 +38,7 @@ RUN apk add gcc g++ python3-dev musl-dev linux-headers
32
38
33
39
RUN pip install --no-cache-dir --target workspace /opt/distro/*.whl -r requirements.txt
34
40
35
- FROM docker.elastic.co/wolfi/chainguard-base:latest@sha256:26caa6beaee2bbf739a82e91a35173892dfe888d0a744b9e46cdc19a90d8656f
41
+ FROM ${IMAGE}:${IMAGE_VERSION}
36
42
37
43
COPY --from=build /operator-build/workspace /autoinstrumentation
38
44
COPY --from=build-musl /operator-build/workspace /autoinstrumentation-musl
You can’t perform that action at this time.
0 commit comments