Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions .github/workflows/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,38 @@ on:
paths:
- 'instrumentation/nginx/**'
- '.github/workflows/nginx.yml'
tags:
- 'nginx/*'
pull_request:
branches: [ main ]
branches: [main]
paths:
- 'instrumentation/nginx/**'
- '.github/workflows/nginx.yml'

jobs:
create-release:
if: startsWith(github.ref, 'refs/tags/nginx')
runs-on: ubuntu-latest
steps:
- name: Release
uses: softprops/action-gh-release@v2
upload-release-artifacts:
if: startsWith(github.ref, 'refs/tags/nginx')
runs-on: ubuntu-latest
needs: [nginx-build-test, create-release]
steps:
- name: Create directory
run: |
mkdir artifacts
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Upload release artifacts
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
files: ./artifacts/*
nginx-build-test:
name: nginx
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -55,6 +80,7 @@ jobs:
cd instrumentation/nginx
docker build -t otel-nginx-test/nginx \
--build-arg image=${{ matrix.image }} \
--build-arg nginx_version=${{ matrix.nginx }} \
-f test/${{ env.dockerfile }} \
--cache-from type=local,src=/tmp/buildx-cache/nginx \
--cache-to type=local,dest=/tmp/buildx-cache/nginx-new \
Expand All @@ -80,11 +106,15 @@ jobs:
mkdir -p /tmp/otel_ngx/
docker build -f test/${{ env.dockerfile }} \
--build-arg image=${{ matrix.image }} \
--build-arg nginx_version=${{ matrix.nginx }} \
--target export \
--output type=local,dest=/tmp/otel_ngx .
echo "artifactName=otel_ngx_module-$(echo ${{ matrix.image }} | sed s/:/-/)-${{ matrix.nginx }}.so" >> $GITHUB_ENV
- name: rename artifact
run: |
mv /tmp/otel_ngx/otel_ngx_module.so /tmp/otel_ngx/${{ env.artifactName }}
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifactName }}
path: /tmp/otel_ngx/otel_ngx_module.so
path: /tmp/otel_ngx/${{ env.artifactName }}