Files
nginx-proxy-manager/.github/workflows/update-and-lint.yml
2024-04-20 18:38:03 +02:00

33 lines
940 B
YAML

name: update-and-lint
on:
push:
branches:
- develop
- php
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
jobs:
update-and-lint:
runs-on: ubuntu-latest
if: ${{ github.ref_name == 'develop' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: lint
run: |
cd src
- 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