Skip to content

Commit

Permalink
dockerfile selection
Browse files Browse the repository at this point in the history
  • Loading branch information
seemk committed Nov 28, 2024
1 parent d8b19cc commit dd1af8c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
name: nginx
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
image: ["ubuntu:24.04", "debian:11", "alpine:3.20"]
nginx: ["1.27.3", "1.26.2", "1.24.0", "1.22.1"]
Expand All @@ -40,12 +41,19 @@ jobs:
--cache-to type=local,dest=/tmp/buildx-cache/express-new \
--load \
test/backend/simple_express
- name: Choose Dockerfile
run: |
if [ ${{ matrix.image }} == "alpine"* ]; then
echo "dockerfile=Dockerfile_alpine" >> $GITHUB_ENV
else
echo "dockerfile=Dockerfile" >> $GITHUB_ENV
fi
- name: build nginx docker
run: |
cd instrumentation/nginx
docker build -t otel-nginx-test/nginx \
--build-arg image=${{ matrix.image }} \
-f test/Dockerfile \
-f test/${{ env.dockerfile }} \
--cache-from type=local,src=/tmp/buildx-cache/nginx \
--cache-to type=local,dest=/tmp/buildx-cache/nginx-new \
--load \
Expand All @@ -68,7 +76,7 @@ jobs:
run: |
cd instrumentation/nginx
mkdir -p /tmp/otel_ngx/
docker build -f test/Dockerfile \
docker build -f test/${{ env.dockerfile }} \
--build-arg image=${{ matrix.image }} \
--target export \
--output type=local,dest=/tmp/otel_ngx .
Expand Down

0 comments on commit dd1af8c

Please sign in to comment.