From fe542d30ba514ff9b14b9183980023e7d6e58b2a Mon Sep 17 00:00:00 2001 From: Alex Jarmoszuk <5645408+ajarmoszuk@users.noreply.github.com> Date: Sat, 13 Apr 2024 17:19:20 +0200 Subject: [PATCH] Create nginx-module-build.yml --- .github/workflows/nginx-module-build.yml | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/nginx-module-build.yml diff --git a/.github/workflows/nginx-module-build.yml b/.github/workflows/nginx-module-build.yml new file mode 100644 index 0000000..464f83a --- /dev/null +++ b/.github/workflows/nginx-module-build.yml @@ -0,0 +1,46 @@ +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 libnginx-mod-http-lua gcc make + + - name: Clone NGINX source code + run: | + git clone https://github.com/nginx/nginx.git ~/nginx-source + echo "NGINX_PATH=~/nginx-source" >> $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