mirror of
https://github.com/simon987/ngx_http_js_challenge_module.git
synced 2025-04-10 14:06:46 +00:00
49 lines
1010 B
YAML
49 lines
1010 B
YAML
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: Clone NGINX source code
|
|
run: |
|
|
wget https://nginx.org/download/nginx-${VERSION}.tar.gz
|
|
tar -xvzf nginx-${VERSION}.tar.gz
|
|
mv nginx-${VERSION} 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
|