Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
Add workflow to check grammar diagram is up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
Gashmob committed Sep 6, 2023
1 parent 3ac4be6 commit 379549c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Changes check

on:
push:
paths:
- "src/lib/grammar/FilLexer.g4"
- "src/lib/grammar/FilParser.g4"
- ".github/workflows/changes.yml"

jobs:
diagram:
name: Diagram check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Generate diagram
run: ${{github.workspace}}/bin/railroad_diagram.sh
- name: Check no changes
run: ${{github.workspace}}/bin/check_no_changes.sh
7 changes: 7 additions & 0 deletions bin/check_no_changes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [[ -z "$(git status --porcelain)" ]]; then
exit 0
else
exit 1
fi

0 comments on commit 379549c

Please sign in to comment.