2024-04-13 17:36:33 +02:00

53 lines
1.2 KiB
YAML

name: Build NGINX Module
on:
push:
branches:
- master # Ensure this matches your main branch name
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: List modules
run: |
ls ${NGINX_PATH}/objs
- name: Package module
run: |
find ${NGINX_PATH}/objs -name "*.so" -exec tar -czvf ngx_http_js_challenge_module.tar.gz -C ${NGINX_PATH}/objs {} +
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ngx_http_js_challenge_module
path: ngx_http_js_challenge_module.tar.gz
- name: Check module output
run: |
ls ${NGINX_PATH}/objs/*.so