fixed analysis and error writing #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: bulk-parse action | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
has_changes: ${{ steps.check_changes.outputs.has_changes }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run bulk-parse script | |
run: node ./scripts/bulk-parse.js | |
- name: Check for changes | |
id: check_changes | |
run: | | |
if git status --porcelain | grep -E '^(M|A|D|\?\?)'; then | |
echo "Changes detected." | |
echo "::set-output name=has_changes::true" | |
else | |
echo "No changes to commit." | |
echo "::set-output name=has_changes::false" | |
fi | |
- name: Commit and push changes | |
if: steps.check_changes.outputs.has_changes == 'true' | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Add files generated by GitHub Action" | |
git push |