Skip to content

Syntax Enforcer

Syntax Enforcer #20

name: Syntax Enforcer
on:
schedule:
- cron: 0 0 1 * *
workflow_dispatch:
jobs:
qa:
name: Syntax Enforcer
runs-on: ubuntu-latest
if: github.repository_owner == 'PreMiD'
steps:
- name: Checkout Project
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 16
uses: actions/[email protected]
with:
node-version: 16
cache: npm
- name: Install dependencies
run: HUSKY=0 npm ci
- name: Start SE
run: |
git config --global core.quotePath false
git config --global core.precomposeunicode true
npm run schemaEnforcer uncommitted
- name: Commit any changes
if: always()
run: |
git add .;
if git diff-index --quiet HEAD --; then
exit 0;
else
git config --local user.email "${GITHUB_EMAIL}";
git config --local user.name "${GITHUB_USER}";
branch=semid/se/`date +%F-%H-%M`;
git checkout -b $branch;
git commit -sam "chore: update assets";
git push -u origin $branch;
gh pr create --fill --base main --head $branch --title "chore: update assets" --body "*beep boop* I've updated some assets...";
fi
env:
GITHUB_USER: SeMiD
GITHUB_EMAIL: [email protected]
GITHUB_TOKEN: ${{ secrets.AUTOMERGE }}