name: Build NGINX Module on: push: branches: - master pull_request: branches: - master jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Install dependencies run: | sudo apt-get update sudo apt-get install -y nginx gcc make - name: Download and extract NGINX source run: | wget https://nginx.org/download/nginx-1.25.4.tar.gz tar -xvzf nginx-1.25.4.tar.gz echo "NGINX_PATH=$(pwd)/nginx-1.25.4" >> $GITHUB_ENV - name: Run build script run: | chmod +x build.sh ./build.sh - name: Package module run: | tar -czvf ngx_module.tar.gz -C ${NGINX_PATH}/objs *.so - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: ngx-module path: ngx_module.tar.gz - name: Check module output run: | ls ${NGINX_PATH}/objs/*.so