Skip to content

Fix 'a' particle may renamed accidentally by path picker #52

Fix 'a' particle may renamed accidentally by path picker

Fix 'a' particle may renamed accidentally by path picker #52

name: "\"Compile\" Groovy Scripts"
on:
push:
branches:
- main
paths:
- '_*.groovy'
- "compiler.py"
- ".github/workflows/they_said_to_compile.yaml"
- "modules/**"
- "post_*.groovy"
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure Git
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install regex
- name: Run Groovy So-Compiler for file format
run: |
# Find groovy files starts with _ on current directory
groovyFiles=$(find . -type f -name "_*.groovy")
# Compile each groovy file
for file in $groovyFiles; do
compiledFile="compiled/$(basename "$file" | sed 's/^_//')"
python3 compiler.py "$file" "$compiledFile"
done
- name: Run Groovy So-Called Compiler for post_ and preset_*.groovy files
run: |
# Find groovy files starts with post_ and preset_ on current directory
groovyFiles=$(find . -type f -name "post_*.groovy")
# Compile each groovy file
for file in $groovyFiles; do
compiledFile="compiled/$(basename "$file")"
python3 compiler.py "$file" "$compiledFile"
done
- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add compiled
git commit -m "Compile Groovy Scripts"
git push