mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-03 07:53:39 +00:00
40
.github/workflows/update-and-lint.yml
vendored
Normal file
40
.github/workflows/update-and-lint.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: update-and-lint
|
||||
on:
|
||||
push:
|
||||
schedule:
|
||||
- cron: "0 */6 * * *"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
update-and-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 19
|
||||
- name: eslint
|
||||
run: |
|
||||
cd backend
|
||||
yarn install --no-lockfile
|
||||
yarn eslint . --fix
|
||||
- name: update
|
||||
run: |
|
||||
curl -L https://unpkg.com/xregexp/xregexp-all.js -o rootfs/nftd/xregexp-all.js
|
||||
curl -L https://unpkg.com/showdown/dist/showdown.min.js -o rootfs/nftd/showdown.min.js
|
||||
curl -L https://code.jquery.com/jquery-"$(git ls-remote --tags https://github.com/jquery/jquery | cut -d/ -f3 | sort -V | tail -1 | sed -E "s/\^\{\}//")".min.js -o rootfs/nftd/jquery.min.js
|
||||
curl -L https://cdn.jsdelivr.net/npm/bootstrap@"$(git ls-remote --tags https://github.com/twbs/bootstrap v3.3.* | cut -d/ -f3 | sort -V | tail -1 | sed -E "s/\^\{\}//")"/dist/css/bootstrap.min.css -o rootfs/html/404/bootstrap.min.css
|
||||
curl -L https://cdn.jsdelivr.net/npm/bootstrap@"$(git ls-remote --tags https://github.com/twbs/bootstrap v3.3.* | cut -d/ -f3 | sort -V | tail -1 | sed -E "s/\^\{\}//")"/dist/css/bootstrap.min.css -o rootfs/html/default/bootstrap.min.css
|
||||
- name: nginxbeautifier
|
||||
run: |
|
||||
yarn global add nginxbeautifier
|
||||
mv rootfs/usr/local/nginx/conf/conf.d/include/block-exploits.conf block-exploits.conf
|
||||
nginxbeautifier -s 4 -r rootfs/usr/local/nginx/conf
|
||||
mv block-exploits.conf rootfs/usr/local/nginx/conf/conf.d/include/block-exploits.conf
|
||||
- name: push changes
|
||||
run: |
|
||||
git add -A
|
||||
git config user.name "GitHub"
|
||||
git config user.email "noreply@github.com"
|
||||
git diff-index --quiet HEAD || git commit -sm "update and lint"
|
||||
git push
|
Reference in New Issue
Block a user