mirror of
https://github.com/simon987/ngx_http_js_challenge_module.git
synced 2025-04-19 18:26:42 +00:00
Create nginx-module-build.yml
This commit is contained in:
parent
8ca88100a4
commit
fe542d30ba
46
.github/workflows/nginx-module-build.yml
vendored
Normal file
46
.github/workflows/nginx-module-build.yml
vendored
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user